diff --git a/.gitignore b/.gitignore index 467fa7c..c510ac2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ composeApp/src/commonMain/moko-resources/assets/* *.iml .gradle +.kotlin /local.properties /.idea .DS_Store diff --git a/build.gradle.kts b/build.gradle.kts index af8d57f..1348bda 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask +import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin import org.jetbrains.kotlin.gradle.targets.js.yarn.yarn import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -11,13 +12,14 @@ plugins { alias(libs.plugins.android.library) apply false alias(libs.plugins.cocoapods) apply false alias(libs.plugins.compose) apply false + // alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.crashlytics) apply false alias(libs.plugins.konfig) apply false alias(libs.plugins.multiplatform) apply false alias(libs.plugins.moko.resources) apply false alias(libs.plugins.sekret) apply false alias(libs.plugins.serialization) apply false - alias(libs.plugins.complete.kotlin) + alias(libs.plugins.complete.kotlin) // Disable for K2 or bump version alias(libs.plugins.versions) } @@ -51,8 +53,8 @@ allprojects { } tasks.withType().configureEach { - kotlinOptions.jvmTarget = CompileOptions.jvmTarget compilerOptions { + jvmTarget.set(JvmTarget.fromTarget(CompileOptions.jvmTargetString)) freeCompilerArgs.addAll( "-P", "plugin:androidx.compose.compiler.plugins.kotlin:experimentalStrongSkipping=true" diff --git a/buildSrc/src/main/kotlin/CompileOptions.kt b/buildSrc/src/main/kotlin/CompileOptions.kt index 7968e40..e7d6233 100644 --- a/buildSrc/src/main/kotlin/CompileOptions.kt +++ b/buildSrc/src/main/kotlin/CompileOptions.kt @@ -3,7 +3,7 @@ import org.gradle.api.JavaVersion object CompileOptions { val sourceCompatibility = JavaVersion.VERSION_17 val targetCompatibility = JavaVersion.VERSION_17 - val jvmTarget = targetCompatibility.toString() + val jvmTargetString = targetCompatibility.toString() val jvmTargetVersion = when { targetCompatibility.isJava5 -> 5 targetCompatibility.isJava6 -> 6 diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 4219d93..8f4999f 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -10,6 +10,7 @@ plugins { alias(libs.plugins.multiplatform) alias(libs.plugins.android.application) alias(libs.plugins.compose) + // alias(libs.plugins.compose.compiler) alias(libs.plugins.konfig) alias(libs.plugins.moko.resources) alias(libs.plugins.sekret) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1c6d411..c61e71a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ kmpalette = "3.1.0" kodein = "7.22.0" kolor = "1.6.0" konfig = "0.15.1" -kotlin = "1.9.23" +kotlin = "1.9.23" # K2 requires GitLive Firebase bump ksp = "1.9.23-1.0.20" ktor = "2.3.11" ktorfit = "1.13.0" @@ -128,6 +128,7 @@ android-library = { id = "com.android.library", version.ref = "android" } apollo = { id = "com.apollographql.apollo3", version.ref = "apollo" } cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" } compose = { id = "org.jetbrains.compose", version.ref = "compose" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } complete-kotlin = { id = "com.louiscad.complete-kotlin", version.ref = "complete-kotlin" } crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "crashlytics-plugin" } konfig = { id = "com.codingfeline.buildkonfig", version.ref = "konfig" }