Skip to content

Commit

Permalink
Kotlin 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbsl committed May 1, 2024
1 parent d49d46b commit 724a6cc
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ xcuserdata
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings

# Kotlin
.kotlin
15 changes: 15 additions & 0 deletions compose-demo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -44,6 +48,17 @@ kotlin {
}
}

// https://github.com/JetBrains/compose-multiplatform/issues/4739
tasks.withType<LintModelWriterTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}
tasks.withType<LintModelMetadataTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}
tasks.withType<AndroidLintAnalysisTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}

android {
namespace = "org.kodein.emoji.compose.demo"
setCompileSdkVersion(34)
Expand Down
12 changes: 12 additions & 0 deletions emoji-compose-m2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -16,6 +20,14 @@ kotlin.kodein {
}
}

// https://github.com/JetBrains/compose-multiplatform/issues/4739
tasks.withType<LintModelWriterTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}
tasks.withType<LintModelMetadataTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}

android {
namespace = "org.kodein.emoji.compose.m2"
}
Expand Down
12 changes: 12 additions & 0 deletions emoji-compose-m3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -16,6 +20,14 @@ kotlin.kodein {
}
}

// https://github.com/JetBrains/compose-multiplatform/issues/4739
tasks.withType<LintModelWriterTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}
tasks.withType<LintModelMetadataTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}

android {
namespace = "org.kodein.emoji.compose.m3"
}
Expand Down
12 changes: 12 additions & 0 deletions emoji-compose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -26,6 +30,14 @@ kotlin.kodein {
}
}

// https://github.com/JetBrains/compose-multiplatform/issues/4739
tasks.withType<LintModelWriterTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}
tasks.withType<LintModelMetadataTask> {
dependsOn("generateResourceAccessorsForAndroidUnitTest")
}

android {
namespace = "org.kodein.emoji.compose"
}
Expand Down
2 changes: 1 addition & 1 deletion emoji-kt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ val genEmojis = tasks.create<GenEmojis>("genEmojis")

kotlin.kodein {
all {
compilations.main {
target.compilations.named("main") {
compileTaskProvider { dependsOn(genEmojis) }
}
}
Expand Down
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit 724a6cc

Please sign in to comment.