Skip to content

Commit

Permalink
update kmp configs
Browse files Browse the repository at this point in the history
  • Loading branch information
terrakok committed Aug 29, 2024
1 parent 765b421 commit 8373348
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,9 @@ class ModuleBuildGradleKts(info: ProjectInfo) : ProjectFile {
appendLine("")
appendLine("kotlin {")
if (info.hasPlatform(ProjectPlatform.Android)) {
appendLine(" jvmToolchain(11)")
appendLine(" androidTarget {")
appendLine(" publishLibraryVariants(\"release\")")
appendLine(" compilations.all {")
appendLine(" kotlinOptions {")
appendLine(" jvmTarget = \"17\"")
appendLine(" }")
appendLine(" }")
appendLine(" }")
appendLine("")
}
Expand Down Expand Up @@ -214,10 +210,6 @@ class ModuleBuildGradleKts(info: ProjectInfo) : ProjectFile {
appendLine(" defaultConfig {")
appendLine(" minSdk = ${info.androidMinSdk}")
appendLine(" }")
appendLine(" compileOptions {")
appendLine(" sourceCompatibility = JavaVersion.VERSION_17")
appendLine(" targetCompatibility = JavaVersion.VERSION_17")
appendLine(" }")
appendLine("}")
}

Expand Down
6 changes: 3 additions & 3 deletions src/jvmTest/kotlin/wizard/GeneratedKmpLibraryProjectTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ class GeneratedKmpLibraryProjectTest {
"platformType": "androidJvm",
"extras": {
"android": {
"sourceCompatibility": "17",
"targetCompatibility": "17"
"sourceCompatibility": "11",
"targetCompatibility": "11"
}
}
},
Expand Down Expand Up @@ -250,7 +250,7 @@ class GeneratedKmpLibraryProjectTest {
"platformType": "jvm",
"extras": {
"jvm": {
"jvmTarget": "17",
"jvmTarget": "11",
"withJavaEnabled": false
}
}
Expand Down
28 changes: 6 additions & 22 deletions src/jvmTest/kotlin/wizard/KmpLibraryGeneratorTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,9 @@ class GeneratorTest {
version = "1.0"
kotlin {
jvmToolchain(11)
androidTarget {
publishLibraryVariants("release")
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
jvm()
Expand Down Expand Up @@ -178,14 +174,10 @@ class GeneratorTest {
android {
namespace = "my.company.name"
compileSdk = 34
compileSdk = ${info.androidTargetSdk}
defaultConfig {
minSdk = 26
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
minSdk = ${info.androidMinSdk}
}
}
Expand Down Expand Up @@ -429,13 +421,9 @@ class GeneratorTest {
version = "1.0"
kotlin {
jvmToolchain(11)
androidTarget {
publishLibraryVariants("release")
compilations.all {
kotlinOptions {
jvmTarget = "17"
}
}
}
jvm()
Expand All @@ -454,14 +442,10 @@ class GeneratorTest {
android {
namespace = "my.company"
compileSdk = 34
compileSdk = ${info.androidTargetSdk}
defaultConfig {
minSdk = 26
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
minSdk = ${info.androidMinSdk}
}
}
Expand Down

0 comments on commit 8373348

Please sign in to comment.