diff --git a/.gitignore b/.gitignore index 36e02236fc2..8f3779a5267 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ # Java class files *.class +# Kotlin files +.kotlin/ + # Generated files bin/ gen/ diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e7f655796fd..735cd81afbd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,6 +28,7 @@ plugins { id(libs.plugins.wire.hilt.get().pluginId) alias(libs.plugins.kotlin.serialization) alias(libs.plugins.ksp) + alias(libs.plugins.compose.compiler) id(libs.plugins.aboutLibraries.get().pluginId) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/details/editguestaccess/CreateGuestLinkBottomSheet.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/details/editguestaccess/CreateGuestLinkBottomSheet.kt index 1f0f917fffd..f47332cd2e6 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/details/editguestaccess/CreateGuestLinkBottomSheet.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/details/editguestaccess/CreateGuestLinkBottomSheet.kt @@ -17,6 +17,7 @@ */ package com.wire.android.ui.home.conversations.details.editguestaccess +import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview @@ -74,6 +75,7 @@ private fun CreateInviteLinkSheetItem( ) } +@OptIn(ExperimentalMaterial3Api::class) @Preview @Composable fun PreviewCreateGuestLinkBottomSheet() { @@ -84,6 +86,7 @@ fun PreviewCreateGuestLinkBottomSheet() { ) } +@OptIn(ExperimentalMaterial3Api::class) @Preview @Composable fun PreviewCreateGuestLinkBottomSheetDisabled() { diff --git a/app/src/main/kotlin/com/wire/android/ui/settings/devices/e2ei/E2eiCertificateDetailsBottomSheet.kt b/app/src/main/kotlin/com/wire/android/ui/settings/devices/e2ei/E2eiCertificateDetailsBottomSheet.kt index a1e76ce0297..2cf770a83f2 100644 --- a/app/src/main/kotlin/com/wire/android/ui/settings/devices/e2ei/E2eiCertificateDetailsBottomSheet.kt +++ b/app/src/main/kotlin/com/wire/android/ui/settings/devices/e2ei/E2eiCertificateDetailsBottomSheet.kt @@ -17,6 +17,7 @@ */ package com.wire.android.ui.settings.devices.e2ei +import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview @@ -86,6 +87,7 @@ private fun CreateCertificateSheetItem( ) } +@OptIn(ExperimentalMaterial3Api::class) @Preview @Composable fun PreviewE2eiCertificateDetailsBottomSheet() { diff --git a/build-logic/plugins/src/main/kotlin/AndroidApplicationConventionPlugin.kt b/build-logic/plugins/src/main/kotlin/AndroidApplicationConventionPlugin.kt index 46d2069f7d8..2b0a772bb09 100644 --- a/build-logic/plugins/src/main/kotlin/AndroidApplicationConventionPlugin.kt +++ b/build-logic/plugins/src/main/kotlin/AndroidApplicationConventionPlugin.kt @@ -28,6 +28,7 @@ class AndroidApplicationConventionPlugin : Plugin { with(pluginManager) { apply("com.android.application") apply("org.jetbrains.kotlin.android") + apply("org.jetbrains.kotlin.plugin.compose") } extensions.configure { diff --git a/build-logic/plugins/src/main/kotlin/AndroidLibraryConventionPlugin.kt b/build-logic/plugins/src/main/kotlin/AndroidLibraryConventionPlugin.kt index 0c81086aaef..f00bc736306 100644 --- a/build-logic/plugins/src/main/kotlin/AndroidLibraryConventionPlugin.kt +++ b/build-logic/plugins/src/main/kotlin/AndroidLibraryConventionPlugin.kt @@ -28,6 +28,7 @@ class AndroidLibraryConventionPlugin : Plugin { with(pluginManager) { apply("com.android.library") apply("org.jetbrains.kotlin.android") + apply("org.jetbrains.kotlin.plugin.compose") } extensions.configure { diff --git a/build-logic/plugins/src/main/kotlin/com/wire/android/gradle/ComposeConfiguration.kt b/build-logic/plugins/src/main/kotlin/com/wire/android/gradle/ComposeConfiguration.kt index ad2d219df5d..dda6340f7c7 100644 --- a/build-logic/plugins/src/main/kotlin/com/wire/android/gradle/ComposeConfiguration.kt +++ b/build-logic/plugins/src/main/kotlin/com/wire/android/gradle/ComposeConfiguration.kt @@ -18,7 +18,6 @@ package com.wire.android.gradle import com.android.build.api.dsl.CommonExtension -import findVersion import org.gradle.api.Project internal fun Project.configureCompose( @@ -27,8 +26,4 @@ internal fun Project.configureCompose( buildFeatures { compose = true } - - composeOptions { - kotlinCompilerExtensionVersion = findVersion("compose.compiler").requiredVersion - } } diff --git a/build.gradle.kts b/build.gradle.kts index f7e2eb8891d..cd50a665c39 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -54,5 +54,6 @@ allprojects { plugins { id(ScriptPlugins.infrastructure) alias(libs.plugins.ksp) apply false // https://github.com/google/dagger/issues/3965 + alias(libs.plugins.compose.compiler) apply false } diff --git a/buildSrc/src/main/kotlin/scripts/quality.gradle.kts b/buildSrc/src/main/kotlin/scripts/quality.gradle.kts index 5f74cce755f..eb764a5117f 100644 --- a/buildSrc/src/main/kotlin/scripts/quality.gradle.kts +++ b/buildSrc/src/main/kotlin/scripts/quality.gradle.kts @@ -89,3 +89,11 @@ tasks.register("testCoverage") { description = "Reports code coverage on tests within the Wire Android codebase." dependsOn("koverXmlReport") } + +//configurations.matching { it.name == "detekt" }.all { +// resolutionStrategy.eachDependency { +// if (requested.group == "org.jetbrains.kotlin") { +// useVersion("1.9.23") +// } +// } +//} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c6cafd76fa7..183d81d9143 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ gradle = "8.8" # Kotlin grgitCore = "5.2.2" -kotlin = "1.9.23" +kotlin = "2.0.21" # KotlinX coroutines = "1.8.0" @@ -14,7 +14,7 @@ ktx-immutableCollections = "0.3.8" ktx-serialization = "1.6.3" # Android Core / Architecture -detekt = "1.23.6" +detekt = "1.23.7" google-gms = "4.4.2" gms-location = "21.3.0" android-gradlePlugin = "8.5.2" @@ -48,7 +48,6 @@ compose-qr = "1.0.1" # Compose composeBom = "2024.10.00" compose-activity = "1.9.2" -compose-compiler = "1.5.13" compose-constraint = "1.0.1" compose-navigation = "2.7.7" # adjusted to work with compose-destinations "1.9.54" compose-destinations = "1.10.2" @@ -84,7 +83,7 @@ openIdAppAuth = "0.11.1" # Other Tools aboutLibraries = "11.1.4" leakCanary = "2.14" -ksp = "1.9.23-1.0.20" +ksp = "2.0.21-1.0.25" # Benchmark benchmark-macro-junit4 = "1.3.0" @@ -110,6 +109,7 @@ hamcrest = "2.2" [plugins] # 3rd Party plugins +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } android-library = { id = "com.android.library", version.ref = "android-gradlePlugin" } android-application = { id = "com.android.application", version.ref = "android-gradlePlugin" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } diff --git a/kalium b/kalium index f417fd46f63..921e07b7a55 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit f417fd46f63b0e2c82faf4f86ed115718829f1c6 +Subproject commit 921e07b7a55590de6ca1a4127ad69e1762dc04e3