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

2
cef/settings.gradle.kts

@ -1,7 +1,7 @@
pluginManagement { pluginManagement {
repositories { repositories {
gradlePluginPortal() 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)) Spacer(Modifier.width(10.dp))
Button( Button(
backgroundColor = Color(16, 180, 140),
modifier = Modifier.preferredHeight(48.dp), modifier = Modifier.preferredHeight(48.dp),
shape = CircleShape, shape = CircleShape,
onClick = { BrowserState.loadURL(BrowserState.url.value) } 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) { fun loadURL(url: String) {
if (!isReady.value) { if (!isReady.value) {
val app = AppManager.getCurrentFocusedWindow() val app = AppManager.focusedWindow
if (app != null) { if (app != null) {
init(app, url) 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.IRect
import org.jetbrains.skija.Bitmap 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.ui.graphics.nativeCanvas
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
@ -87,7 +87,7 @@ fun CefCanvas(bitmap: Bitmap, browser: BrowserState) {
.focus() .focus()
.clickable(indication = null) { focusRequester.requestFocus() } .clickable(indication = null) { focusRequester.requestFocus() }
) { ) {
drawCanvas { canvas, size -> drawIntoCanvas { canvas ->
canvas.nativeCanvas.drawBitmapRect(bitmap, IRect(0, 0, width.value, height.value).toRect()) 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 .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 { sourceSets {
named("jvmMain") { named("jvmMain") {
dependencies { dependencies {
implementation(compose.desktop.all) implementation(compose.desktop.currentOs)
implementation(project(":common")) implementation(project(":common"))
} }
} }

18
examples/issues/.gitignore vendored

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

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

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

2
examples/todoapp/.gitignore vendored

@ -9,7 +9,7 @@
/.idea/navEditor.xml /.idea/navEditor.xml
/.idea/assetWizardSettings.xml /.idea/assetWizardSettings.xml
.DS_Store .DS_Store
/build build/
/captures /captures
.externalNativeBuild .externalNativeBuild
.cxx .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 { sourceSets {
named("jvmMain") { named("jvmMain") {
dependencies { dependencies {
implementation(compose.desktop.all) implementation(compose.desktop.currentOs)
implementation(project(":common:utils")) implementation(project(":common:utils"))
implementation(project(":common:database")) implementation(project(":common:database"))
implementation(project(":common:root")) 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 *.iml
.idea/workspace.xml .gradle
.idea/tasks.xml /local.properties
.idea/gradle.xml /.idea
.idea/assetWizardSettings.xml /.idea/caches
.idea/dictionaries /.idea/libraries
.idea/libraries /.idea/modules.xml
# Android Studio 3 in .gitignore file. /.idea/workspace.xml
.idea/caches /.idea/navEditor.xml
.idea/modules.xml /.idea/assetWizardSettings.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you .DS_Store
.idea/navEditor.xml build/
/captures
# 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
.externalNativeBuild .externalNativeBuild
.cxx/ .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

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

@ -12,7 +12,7 @@ repositories {
} }
dependencies { dependencies {
implementation(compose.desktop.all) implementation(compose.desktop.currentOs)
} }
application { 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 *.iml
.idea/workspace.xml .gradle
.idea/tasks.xml /local.properties
.idea/gradle.xml /.idea
.idea/assetWizardSettings.xml /.idea/caches
.idea/dictionaries /.idea/libraries
.idea/libraries /.idea/modules.xml
# Android Studio 3 in .gitignore file. /.idea/workspace.xml
.idea/caches /.idea/navEditor.xml
.idea/modules.xml /.idea/assetWizardSettings.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you .DS_Store
.idea/navEditor.xml build/
/captures
# 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
.externalNativeBuild .externalNativeBuild
.cxx/ .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

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

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

2
tutorials/Getting_Started/main.md

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

Loading…
Cancel
Save