diff --git a/.gitignore b/.gitignore index 487312d..adc9ca3 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ xcuserdata !*.xcodeproj/project.xcworkspace/ !*.xcworkspace/contents.xcworkspacedata **/xcshareddata/WorkspaceSettings.xcsettings + +# Kotlin +.kotlin \ No newline at end of file diff --git a/compose-demo/build.gradle.kts b/compose-demo/build.gradle.kts index 2a2cb0e..b7bcf0f 100644 --- a/compose-demo/build.gradle.kts +++ b/compose-demo/build.gradle.kts @@ -1,9 +1,13 @@ +import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask +import com.android.build.gradle.internal.lint.LintModelWriterTask +import com.android.build.gradle.internal.tasks.LintModelMetadataTask import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { kotlin("multiplatform") id("com.android.application") alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) } kotlin { @@ -44,6 +48,17 @@ kotlin { } } +// https://github.com/JetBrains/compose-multiplatform/issues/4739 +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} + android { namespace = "org.kodein.emoji.compose.demo" setCompileSdkVersion(34) diff --git a/emoji-compose-m2/build.gradle.kts b/emoji-compose-m2/build.gradle.kts index 6a3474e..5003b69 100644 --- a/emoji-compose-m2/build.gradle.kts +++ b/emoji-compose-m2/build.gradle.kts @@ -1,6 +1,10 @@ +import com.android.build.gradle.internal.lint.LintModelWriterTask +import com.android.build.gradle.internal.tasks.LintModelMetadataTask + plugins { kodein.library.mppWithAndroid alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) } kotlin.kodein { @@ -16,6 +20,14 @@ kotlin.kodein { } } +// https://github.com/JetBrains/compose-multiplatform/issues/4739 +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} + android { namespace = "org.kodein.emoji.compose.m2" } diff --git a/emoji-compose-m3/build.gradle.kts b/emoji-compose-m3/build.gradle.kts index 4ad32c1..1f81401 100644 --- a/emoji-compose-m3/build.gradle.kts +++ b/emoji-compose-m3/build.gradle.kts @@ -1,6 +1,10 @@ +import com.android.build.gradle.internal.lint.LintModelWriterTask +import com.android.build.gradle.internal.tasks.LintModelMetadataTask + plugins { kodein.library.mppWithAndroid alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) } kotlin.kodein { @@ -16,6 +20,14 @@ kotlin.kodein { } } +// https://github.com/JetBrains/compose-multiplatform/issues/4739 +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} + android { namespace = "org.kodein.emoji.compose.m3" } diff --git a/emoji-compose/build.gradle.kts b/emoji-compose/build.gradle.kts index 6b4bc27..17090e3 100644 --- a/emoji-compose/build.gradle.kts +++ b/emoji-compose/build.gradle.kts @@ -1,6 +1,10 @@ +import com.android.build.gradle.internal.lint.LintModelWriterTask +import com.android.build.gradle.internal.tasks.LintModelMetadataTask + plugins { kodein.library.mppWithAndroid alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) } kotlin.kodein { @@ -26,6 +30,14 @@ kotlin.kodein { } } +// https://github.com/JetBrains/compose-multiplatform/issues/4739 +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} +tasks.withType { + dependsOn("generateResourceAccessorsForAndroidUnitTest") +} + android { namespace = "org.kodein.emoji.compose" } diff --git a/emoji-kt/build.gradle.kts b/emoji-kt/build.gradle.kts index 5e3c9c6..c44820f 100644 --- a/emoji-kt/build.gradle.kts +++ b/emoji-kt/build.gradle.kts @@ -6,7 +6,7 @@ val genEmojis = tasks.create("genEmojis") kotlin.kodein { all { - compilations.main { + target.compilations.named("main") { compileTaskProvider { dependsOn(genEmojis) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 75146eb..8eb0c33 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,13 @@ [versions] -compose = "1.6.1" +compose = "1.6.10-beta03" +compose-compiler = "2.0.0-RC2" android-activityCompose = "1.8.2" android-svg = "1.4" android-lottie = "6.3.0" [plugins] compose = { id = "org.jetbrains.compose", version.ref = "compose" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "compose-compiler" } [libraries] android-activityCompose = { module = "androidx.activity:activity-compose", version.ref = "android-activityCompose" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 86aa58a..3f66675 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,7 +5,7 @@ buildscript { maven(url = "https://raw.githubusercontent.com/kosi-libs/kodein-internal-gradle-plugin/mvn-repo") } dependencies { - classpath("org.kodein.internal.gradle:kodein-internal-gradle-settings:8.6.1") + classpath("org.kodein.internal.gradle:kodein-internal-gradle-settings:8.7.0-kotlin-2.0.0-RC2-SNAPSHOT") } }