diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 050f84b..c6eae40 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.android.application) alias(libs.plugins.jetbrains.kotlin.android) + alias(libs.plugins.compose.compiler) } android { @@ -34,14 +35,6 @@ android { jvmTarget = "17" } - buildFeatures { - compose = true - } - - composeOptions { - kotlinCompilerExtensionVersion = "1.5.14" - } - packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" @@ -49,6 +42,7 @@ android { } } + dependencies { implementation(libs.androidx.core.ktx) implementation(libs.androidx.appcompat) diff --git a/build.gradle.kts b/build.gradle.kts index e3f8a07..13308bc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,4 +3,5 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.jetbrains.kotlin.android) apply false alias(libs.plugins.android.library) apply false + alias(libs.plugins.compose.compiler) apply false } \ No newline at end of file diff --git a/flinger/build.gradle.kts b/flinger/build.gradle.kts index 4b2a357..9ed2e08 100644 --- a/flinger/build.gradle.kts +++ b/flinger/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.android.library) alias(libs.plugins.jetbrains.kotlin.android) + alias(libs.plugins.compose.compiler) id("maven-publish") } @@ -31,19 +32,12 @@ android { jvmTarget = "17" } - buildFeatures { - compose = true - } - - composeOptions { - kotlinCompilerExtensionVersion = "1.5.14" - } - testOptions { unitTests.isIncludeAndroidResources = false } } + dependencies { implementation(platform(libs.androidx.compose.bom)) implementation(libs.androidx.appcompat) diff --git a/gradle.properties b/gradle.properties index 98bed16..72f78fa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,5 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +kotlin.experimental.tryK2=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2bec3f5..4a61b85 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ agp = "8.5.0" core = "1.5.0" flinger = "1.2.2" junit = "4.13.2" -kotlin = "1.9.24" +kotlin = "2.0.0" coreKtx = "1.13.1" activityCompose = "1.9.0" composeBom = "2024.06.00" @@ -32,3 +32,4 @@ androidx-navigation-compose = { group = "androidx.navigation", name = "navigatio android-application = { id = "com.android.application", version.ref = "agp" } jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } android-library = { id = "com.android.library", version.ref = "agp" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }