Browse Source

Merge pull request #30 from JetBrains/fix_multiplatfrom_template

Fix multiplatform projects in IDEA / Android Studio
pull/37/head
Igor Demin 4 years ago committed by GitHub
parent
commit
451f8084b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      examples/imageviewer/build.gradle.kts
  2. 13
      examples/imageviewer/desktop/build.gradle.kts
  3. 0
      examples/imageviewer/desktop/src/jvmMain/kotlin/imageviewer/Main.kt
  4. 14
      examples/imageviewer/settings.gradle.kts
  5. 14
      examples/issues/build.gradle.kts
  6. 13
      examples/issues/desktop/build.gradle.kts
  7. 0
      examples/issues/desktop/src/jvmMain/kotlin/androidx/ui/examples/jetissues/Main.kt
  8. 14
      examples/issues/settings.gradle.kts
  9. 14
      examples/todoapp/desktop/build.gradle.kts
  10. 0
      examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/Main.kt
  11. 16
      templates/multiplatform-template/build.gradle.kts
  12. 13
      templates/multiplatform-template/desktop/build.gradle.kts
  13. 0
      templates/multiplatform-template/desktop/src/jvmMain/kotlin/main.kt
  14. 16
      templates/multiplatform-template/settings.gradle.kts

14
examples/imageviewer/build.gradle.kts

@ -1,3 +1,17 @@
buildscript {
repositories {
google()
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-dev97")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}
}
allprojects {
repositories {
mavenLocal()

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

@ -1,15 +1,24 @@
import org.jetbrains.compose.compose
plugins {
kotlin("jvm")
kotlin("multiplatform") // kotlin("jvm") doesn't work well in IDEA/AndroidStudio (https://github.com/JetBrains/compose-jb/issues/22)
id("org.jetbrains.compose")
java
application
}
dependencies {
kotlin {
jvm {
withJava()
}
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":common"))
}
}
}
}
application {

0
examples/imageviewer/desktop/src/main/kotlin/imageviewer/Main.kt → examples/imageviewer/desktop/src/jvmMain/kotlin/imageviewer/Main.kt

14
examples/imageviewer/settings.gradle.kts

@ -1,15 +1 @@
buildscript {
repositories {
google()
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-dev97")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}
}
include(":common", ":android", ":desktop")

14
examples/issues/build.gradle.kts

@ -1,3 +1,17 @@
buildscript {
repositories {
google()
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-dev97")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}
}
allprojects {
repositories {
mavenLocal()

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

@ -1,15 +1,24 @@
import org.jetbrains.compose.compose
plugins {
kotlin("jvm")
kotlin("multiplatform") // kotlin("jvm") doesn't work well in IDEA/AndroidStudio (https://github.com/JetBrains/compose-jb/issues/22)
id("org.jetbrains.compose")
java
application
}
dependencies {
kotlin {
jvm {
withJava()
}
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":common"))
}
}
}
}
application {

0
examples/issues/desktop/src/main/kotlin/androidx/ui/examples/jetissues/Main.kt → examples/issues/desktop/src/jvmMain/kotlin/androidx/ui/examples/jetissues/Main.kt

14
examples/issues/settings.gradle.kts

@ -1,15 +1 @@
buildscript {
repositories {
google()
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-dev97")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}
}
include(":common", ":android", ":desktop")

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

@ -1,13 +1,20 @@
import org.jetbrains.compose.compose
plugins {
kotlin("jvm")
kotlin("multiplatform") // kotlin("jvm") doesn't work well in IDEA/AndroidStudio (https://github.com/JetBrains/compose-jb/issues/22)
id("org.jetbrains.compose")
java
application
}
dependencies {
kotlin {
jvm {
withJava()
}
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":common:utils"))
implementation(project(":common:database"))
@ -17,6 +24,9 @@ dependencies {
implementation(Deps.ArkIvanov.MVIKotlin.mvikotlinMain)
implementation(Deps.Badoo.Reaktive.reaktive)
implementation(Deps.Badoo.Reaktive.coroutinesInterop)
}
}
}
}
application {

0
examples/todoapp/desktop/src/main/kotlin/example/todo/desktop/Main.kt → examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/Main.kt

16
templates/multiplatform-template/build.gradle.kts

@ -1,3 +1,19 @@
buildscript {
val composeVersion = System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "0.1.0-dev97"
repositories {
google()
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:$composeVersion")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}
}
allprojects {
repositories {
google()

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

@ -1,15 +1,24 @@
import org.jetbrains.compose.compose
plugins {
kotlin("jvm")
kotlin("multiplatform") // kotlin("jvm") doesn't work well in IDEA/AndroidStudio (https://github.com/JetBrains/compose-jb/issues/22)
id("org.jetbrains.compose")
java
application
}
dependencies {
kotlin {
jvm {
withJava()
}
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":common"))
}
}
}
}
application {

0
templates/multiplatform-template/desktop/src/main/kotlin/main.kt → templates/multiplatform-template/desktop/src/jvmMain/kotlin/main.kt

16
templates/multiplatform-template/settings.gradle.kts

@ -1,17 +1 @@
buildscript {
val composeVersion = System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "0.1.0-dev97"
repositories {
google()
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:$composeVersion")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}
}
include(":common", ":android", ":desktop")

Loading…
Cancel
Save