1
1
import io.gitlab.arturbosch.detekt.Detekt
2
2
import org.jetbrains.dokka.gradle.DokkaTask
3
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
3
5
4
6
plugins {
5
7
alias(libs.plugins.kotlin.multiplatform)
6
8
alias(libs.plugins.kotlin.compose)
7
9
id(" com.android.library" )
8
- id(" org.jetbrains.compose" )
9
10
alias(libs.plugins.kover)
10
11
alias(libs.plugins.gradle.versions)
11
12
alias(libs.plugins.detekt)
@@ -18,13 +19,23 @@ kotlin {
18
19
explicitApi()
19
20
20
21
androidTarget {
22
+ compilerOptions {
23
+ jvmTarget.set(JvmTarget .JVM_1_8 )
24
+ apiVersion.set(KotlinVersion .KOTLIN_1_8 )
25
+ languageVersion.set(KotlinVersion .KOTLIN_1_8 )
26
+ }
21
27
publishLibraryVariants(" release" )
22
- compilations.all { kotlinOptions.jvmTarget = JavaVersion .VERSION_1_8 .toString() }
23
28
}
24
29
jvm(" desktop" ) {
25
- compilations.all { kotlinOptions.jvmTarget = JavaVersion .VERSION_1_8 .toString() }
30
+ compilerOptions {
31
+ jvmTarget.set(JvmTarget .JVM_1_8 )
32
+ apiVersion.set(KotlinVersion .KOTLIN_1_8 )
33
+ languageVersion.set(KotlinVersion .KOTLIN_1_8 )
34
+ }
26
35
}
27
36
37
+ coreLibrariesVersion = " 1.8"
38
+
28
39
sourceSets.all {
29
40
// Allow all experimental APIs, since MPP projects are themselves experimental
30
41
languageSettings.apply {
@@ -35,9 +46,9 @@ kotlin {
35
46
36
47
sourceSets {
37
48
val commonMain by getting {
38
- dependencies {
39
- compileOnly(compose.runtime )
40
- compileOnly(compose.ui )
49
+ compilerOptions {
50
+ apiVersion.set( KotlinVersion . KOTLIN_1_8 )
51
+ languageVersion.set( KotlinVersion . KOTLIN_1_8 )
41
52
}
42
53
}
43
54
val androidMain by getting {
0 commit comments