Skip to content

Commit ff6c7eb

Browse files
committed
Use Java 11 for Desktop JVM
1 parent 99c020b commit ff6c7eb

File tree

3 files changed

+47
-28
lines changed

3 files changed

+47
-28
lines changed

projects/core/koin-core-viewmodel-navigation/build.gradle.kts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
3-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4-
51
plugins {
2+
alias(libs.plugins.androidLibrary)
63
alias(libs.plugins.kotlinMultiplatform)
74
}
85

96
val koinVersion: String by project
107
version = koinVersion
118

129
kotlin {
13-
10+
androidTarget {
11+
publishLibraryVariants("release")
12+
compilations.all {
13+
kotlinOptions.jvmTarget = "1.8"
14+
}
15+
}
16+
1417
jvm {
15-
withJava()
18+
compilations.all {
19+
kotlinOptions.jvmTarget = "11"
20+
}
1621
}
1722

1823
js(IR) {
@@ -40,10 +45,11 @@ kotlin {
4045
}
4146
}
4247

43-
tasks.withType<KotlinCompile>().all {
44-
compilerOptions {
45-
jvmTarget.set(JvmTarget.JVM_1_8)
46-
}
48+
val androidCompileSDK: String by project
49+
50+
android {
51+
namespace = "org.koin.viewmodel.navigation"
52+
compileSdk = androidCompileSDK.toInt()
4753
}
4854

4955
apply(from = file("../../gradle/publish.gradle.kts"))

projects/core/koin-core-viewmodel/build.gradle.kts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
3-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4-
51
plugins {
2+
alias(libs.plugins.androidLibrary)
63
alias(libs.plugins.kotlinMultiplatform)
74
}
85

96
val koinVersion: String by project
107
version = koinVersion
118

129
kotlin {
10+
androidTarget {
11+
publishLibraryVariants("release")
12+
compilations.all {
13+
kotlinOptions.jvmTarget = "1.8"
14+
}
15+
}
1316

1417
jvm {
15-
withJava()
18+
compilations.all {
19+
kotlinOptions.jvmTarget = "11"
20+
}
1621
}
1722

1823
// // Enable context receivers for all targets
@@ -54,10 +59,11 @@ kotlin {
5459
}
5560
}
5661

57-
tasks.withType<KotlinCompile>().all {
58-
compilerOptions {
59-
jvmTarget.set(JvmTarget.JVM_1_8)
60-
}
62+
val androidCompileSDK: String by project
63+
64+
android {
65+
namespace = "org.koin.viewmodel"
66+
compileSdk = androidCompileSDK.toInt()
6167
}
6268

6369
apply(from = file("../../gradle/publish.gradle.kts"))
Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3-
41
plugins {
2+
alias(libs.plugins.androidLibrary)
53
alias(libs.plugins.kotlinMultiplatform)
64
}
75

86
kotlin {
9-
7+
androidTarget {
8+
publishLibraryVariants("release")
9+
compilations.all {
10+
kotlinOptions.jvmTarget = "1.8"
11+
}
12+
}
13+
1014
jvm {
11-
withJava()
15+
compilations.all {
16+
kotlinOptions.jvmTarget = "11"
17+
}
1218
}
1319

1420
sourceSets {
@@ -22,10 +28,11 @@ kotlin {
2228
}
2329
}
2430

25-
tasks.withType<KotlinCompile>().all {
26-
compilerOptions {
27-
jvmTarget.set(JvmTarget.JVM_1_8)
28-
}
31+
val androidCompileSDK: String by project
32+
33+
android {
34+
namespace = "org.koin.dsl.fu"
35+
compileSdk = androidCompileSDK.toInt()
2936
}
3037

3138
apply(from = file("../../gradle/publish.gradle.kts"))

0 commit comments

Comments
 (0)