Browse Source

Templates. Use currentOs in common MPP module

Temporary (?) workaround for Preview
pull/988/head v1.0.0-alpha1-rc4
Igor Demin 3 years ago
parent
commit
9e4dbe3400
  1. 4
      templates/desktop-template/build.gradle.kts
  2. 6
      templates/multiplatform-template/common/build.gradle.kts
  3. 1
      templates/multiplatform-template/desktop/build.gradle.kts

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

@ -15,6 +15,10 @@ repositories {
} }
dependencies { dependencies {
// Note, if you develop a library, you should use compose.desktop.common.
// compose.desktop.currentOs should be used in launcher-sourceSet
// (in a separate module for demo project and in testMain).
// With compose.desktop.common you will also lose @Preview functionality
implementation(compose.desktop.currentOs) implementation(compose.desktop.currentOs)
} }

6
templates/multiplatform-template/common/build.gradle.kts

@ -20,7 +20,11 @@ kotlin {
} }
named("desktopMain") { named("desktopMain") {
dependencies { dependencies {
api(compose.uiTooling) // Note, if you develop a library, you should use compose.desktop.common.
// compose.desktop.currentOs should be used in launcher-sourceSet
// (in a separate module for demo project and in testMain).
// With compose.desktop.common you will also lose @Preview functionality
api(compose.desktop.currentOs)
} }
} }
named("androidMain") { named("androidMain") {

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

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

Loading…
Cancel
Save