Browse Source

Merge remote-tracking branch 'origin/master' into fix_multiplatfrom_template

# Conflicts:
#	examples/imageviewer/desktop/build.gradle.kts
#	examples/issues/desktop/build.gradle.kts
#	examples/todoapp/desktop/build.gradle.kts
#	templates/multiplatform-template/desktop/build.gradle.kts
pull/30/head
Igor Demin 4 years ago
parent
commit
1fdbf6868d
  1. 6
      cef/build.gradle.kts
  2. 2
      cef/settings.gradle.kts
  3. 1
      cef/src/main/kotlin/org/jetbrains/compose/desktop/App.kt
  4. 2
      cef/src/main/kotlin/org/jetbrains/compose/desktop/browser/BrowserState.kt
  5. 4
      cef/src/main/kotlin/org/jetbrains/compose/desktop/browser/CefView.kt
  6. 16
      examples/imageviewer/.gitignore
  7. 2
      examples/imageviewer/desktop/build.gradle.kts
  8. 18
      examples/issues/.gitignore
  9. 2
      examples/issues/desktop/build.gradle.kts
  10. 2
      examples/todoapp/.gitignore
  11. 1
      examples/todoapp/android/.gitignore
  12. 1
      examples/todoapp/buildSrc/.gitignore
  13. 1
      examples/todoapp/buildSrc/buildSrc/.gitignore
  14. 1
      examples/todoapp/common/database/.gitignore
  15. 1
      examples/todoapp/common/edit/.gitignore
  16. 1
      examples/todoapp/common/main/.gitignore
  17. 1
      examples/todoapp/common/root/.gitignore
  18. 1
      examples/todoapp/common/utils/.gitignore
  19. 1
      examples/todoapp/desktop/.gitignore
  20. 2
      examples/todoapp/desktop/build.gradle.kts
  21. 99
      templates/desktop-template/.gitignore
  22. 2
      templates/desktop-template/build.gradle.kts
  23. 99
      templates/multiplatform-template/.gitignore
  24. 2
      templates/multiplatform-template/desktop/build.gradle.kts
  25. 2
      tutorials/Getting_Started/main.md

6
cef/build.gradle.kts

@ -5,7 +5,7 @@ import kotlin.text.capitalize
plugins {
kotlin("jvm") version "1.4.0"
id("org.jetbrains.compose") version "0.1.0-unmerged30"
id("org.jetbrains.compose") version "0.1.0-dev97"
id("de.undercouch.download") version "4.1.1"
application
}
@ -42,12 +42,14 @@ val cefUnZip = run {
repositories {
google()
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
// temp
maven("https://packages.jetbrains.team/maven/p/ui/dev")
}
dependencies {
implementation("org.jetbrains.jcef:jcef-skiko:0.1")
implementation(compose.desktop.all)
implementation(compose.desktop.currentOs)
}
tasks.withType<KotlinCompile>().configureEach {

2
cef/settings.gradle.kts

@ -1,7 +1,7 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven("https://packages.jetbrains.team/maven/p/ui/dev")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
}

1
cef/src/main/kotlin/org/jetbrains/compose/desktop/App.kt

@ -65,7 +65,6 @@ private fun AddressBar() {
)
Spacer(Modifier.width(10.dp))
Button(
backgroundColor = Color(16, 180, 140),
modifier = Modifier.preferredHeight(48.dp),
shape = CircleShape,
onClick = { BrowserState.loadURL(BrowserState.url.value) }

2
cef/src/main/kotlin/org/jetbrains/compose/desktop/browser/BrowserState.kt

@ -25,7 +25,7 @@ object BrowserState {
fun loadURL(url: String) {
if (!isReady.value) {
val app = AppManager.getCurrentFocusedWindow()
val app = AppManager.focusedWindow
if (app != null) {
init(app, url)
}

4
cef/src/main/kotlin/org/jetbrains/compose/desktop/browser/CefView.kt

@ -19,7 +19,7 @@ import androidx.compose.ui.Modifier
import org.jetbrains.skija.IRect
import org.jetbrains.skija.Bitmap
import androidx.compose.ui.graphics.drawscope.drawCanvas
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
import androidx.compose.ui.graphics.nativeCanvas
import androidx.compose.runtime.getValue
@ -87,7 +87,7 @@ fun CefCanvas(bitmap: Bitmap, browser: BrowserState) {
.focus()
.clickable(indication = null) { focusRequester.requestFocus() }
) {
drawCanvas { canvas, size ->
drawIntoCanvas { canvas ->
canvas.nativeCanvas.drawBitmapRect(bitmap, IRect(0, 0, width.value, height.value).toRect())
}
}

16
examples/imageviewer/.gitignore vendored

@ -1,3 +1,15 @@
.DS_Store
*.iml
.gradle
build
/local.properties
/.idea
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
build/
/captures
.externalNativeBuild
.cxx

2
examples/imageviewer/desktop/build.gradle.kts

@ -14,7 +14,7 @@ kotlin {
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.all)
implementation(compose.desktop.currentOs)
implementation(project(":common"))
}
}

18
examples/issues/.gitignore vendored

@ -1,7 +1,15 @@
/desktop/build
/android/build
/common/build
/.gradle
*.iml
.gradle
/local.properties
/.idea
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
build/
/captures
.externalNativeBuild
.cxx

2
examples/issues/desktop/build.gradle.kts

@ -14,7 +14,7 @@ kotlin {
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.all)
implementation(compose.desktop.currentOs)
implementation(project(":common"))
}
}

2
examples/todoapp/.gitignore vendored

@ -9,7 +9,7 @@
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
build/
/captures
.externalNativeBuild
.cxx

1
examples/todoapp/android/.gitignore vendored

@ -1 +0,0 @@
/build

1
examples/todoapp/buildSrc/.gitignore vendored

@ -1 +0,0 @@
/build

1
examples/todoapp/buildSrc/buildSrc/.gitignore vendored

@ -1 +0,0 @@
/build

1
examples/todoapp/common/database/.gitignore vendored

@ -1 +0,0 @@
/build

1
examples/todoapp/common/edit/.gitignore vendored

@ -1 +0,0 @@
/build

1
examples/todoapp/common/main/.gitignore vendored

@ -1 +0,0 @@
/build

1
examples/todoapp/common/root/.gitignore vendored

@ -1 +0,0 @@
/build

1
examples/todoapp/common/utils/.gitignore vendored

@ -1 +0,0 @@
/build

1
examples/todoapp/desktop/.gitignore vendored

@ -1 +0,0 @@
/build

2
examples/todoapp/desktop/build.gradle.kts

@ -15,7 +15,7 @@ kotlin {
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.all)
implementation(compose.desktop.currentOs)
implementation(project(":common:utils"))
implementation(project(":common:database"))
implementation(project(":common:root"))

99
templates/desktop-template/.gitignore vendored

@ -1,88 +1,15 @@
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.gradle
/local.properties
/.idea
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
build/
/captures
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# Android Profiling
*.hprof
.cxx

2
templates/desktop-template/build.gradle.kts

@ -12,7 +12,7 @@ repositories {
}
dependencies {
implementation(compose.desktop.all)
implementation(compose.desktop.currentOs)
}
application {

99
templates/multiplatform-template/.gitignore vendored

@ -1,88 +1,15 @@
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.gradle
/local.properties
/.idea
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
build/
/captures
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# Android Profiling
*.hprof
.cxx

2
templates/multiplatform-template/desktop/build.gradle.kts

@ -14,7 +14,7 @@ kotlin {
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.all)
implementation(compose.desktop.currentOs)
implementation(project(":common"))
}
}

2
tutorials/Getting_Started/main.md

@ -52,7 +52,7 @@ repositories {
}
dependencies {
implementation(compose.desktop.all)
implementation(compose.desktop.currentOs)
}
application {

Loading…
Cancel
Save