From bd93e54543d1be05e5b24068da54184af20c29df Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 18 Jan 2023 14:38:19 +0100 Subject: [PATCH 1/3] Kotlin 1.8 + cleanup --- app/build.gradle.kts | 4 +--- gradle/libs.versions.toml | 19 +++++++------------ libraries/architecture/build.gradle.kts | 2 +- libraries/matrix/build.gradle.kts | 2 +- plugins/src/main/kotlin/Versions.kt | 4 ---- .../main/kotlin/extension/CommonExtension.kt | 2 +- .../kotlin/extension/DependencyHandleScope.kt | 3 +-- 7 files changed, 12 insertions(+), 24 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 33827f673b..07d0ff2d65 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -117,7 +117,7 @@ android { compose = true } composeOptions { - kotlinCompilerExtensionVersion = "1.3.2" + kotlinCompilerExtensionVersion = "1.4.0" } packagingOptions { resources { @@ -174,8 +174,6 @@ dependencies { // https://developer.android.com/studio/write/java8-support#library-desugaring-versions coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.2") - implementation(libs.compose.destinations) - ksp(libs.compose.destinations.processor) implementation(libs.appyx.core) implementation(libs.androidx.corektx) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 44c3f89979..244f1618f1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,9 +5,9 @@ # Project android_gradle_plugin = "7.3.1" firebase_gradle_plugin = "3.0.2" -kotlin = "1.7.20" -ksp = "1.7.20-1.0.7" -molecule = "0.6.1" +kotlin = "1.8.0" +ksp = "1.8.0-1.0.8" +molecule = "0.7.0" # AndroidX material = "1.6.1" @@ -20,8 +20,7 @@ activity_compose = "1.6.1" startup = "1.1.1" # Compose -compose_compiler = "1.3.2" -compose_bom = "2022.11.00" +compose_bom = "2023.01.00" # Coroutines coroutines = "1.6.4" @@ -41,12 +40,11 @@ test_hamcrest = "2.2" test_orchestrator = "1.4.1" #other -coil = "2.2.1" +coil = "2.2.2" datetime = "0.4.0" wysiwyg = "0.7.0.1" serialization_json = "1.4.1" showkase = "1.0.0-beta14" -compose_destinations = "1.7.23-beta" jsoup = "1.15.3" appyx = "1.0.1" seismic = "1.0.3" @@ -54,8 +52,8 @@ dependencycheck = "7.4.4" stem = "2.2.3" # DI -dagger = "2.43" -anvil = "2.4.2" +dagger = "2.44.2" +anvil = "2.4.4" # quality detekt = "1.22.0" @@ -83,7 +81,6 @@ androidx_activity_compose = { module = "androidx.activity:activity-compose", ver androidx_startup = { module = "androidx.startup:startup-runtime", version.ref = "startup" } androidx_compose_bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose_bom" } -androidx_compose_foundation = { group = "androidx.compose.foundation", name = "foundation" } # Coroutines coroutines_core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } @@ -119,8 +116,6 @@ coil = { module = "io.coil-kt:coil", version.ref = "coil" } coil_compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" } datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "datetime" } serialization_json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization_json" } -compose_destinations = { module = "io.github.raamcosta.compose-destinations:animations-core", version.ref = "compose_destinations" } -compose_destinations_processor = { module = "io.github.raamcosta.compose-destinations:ksp", version.ref = "compose_destinations" } showkase = { module = "com.airbnb.android:showkase", version.ref = "showkase" } showkase_processor = { module = "com.airbnb.android:showkase-processor", version.ref = "showkase" } jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" } diff --git a/libraries/architecture/build.gradle.kts b/libraries/architecture/build.gradle.kts index 1bae19e00b..6dee0513da 100644 --- a/libraries/architecture/build.gradle.kts +++ b/libraries/architecture/build.gradle.kts @@ -22,7 +22,7 @@ plugins { } android { - namespace = "io.element.android.x.libraries.presentation" + namespace = "io.element.android.x.architecture" } dependencies { diff --git a/libraries/matrix/build.gradle.kts b/libraries/matrix/build.gradle.kts index 60f02b180d..56f33523a7 100644 --- a/libraries/matrix/build.gradle.kts +++ b/libraries/matrix/build.gradle.kts @@ -19,7 +19,7 @@ plugins { id("io.element.android-library") alias(libs.plugins.anvil) - kotlin("plugin.serialization") version "1.7.20" + kotlin("plugin.serialization") version "1.8.0" } android { diff --git a/plugins/src/main/kotlin/Versions.kt b/plugins/src/main/kotlin/Versions.kt index 65d17746d9..217a3318fa 100644 --- a/plugins/src/main/kotlin/Versions.kt +++ b/plugins/src/main/kotlin/Versions.kt @@ -15,12 +15,8 @@ */ import org.gradle.api.JavaVersion -import org.gradle.api.artifacts.VersionCatalog import org.gradle.jvm.toolchain.JavaLanguageVersion -val VersionCatalog.composeVersion: String - get() = findVersion("compose_compiler").get().requiredVersion - object Versions { const val versionCode = 100100 const val versionName = "0.1.0" diff --git a/plugins/src/main/kotlin/extension/CommonExtension.kt b/plugins/src/main/kotlin/extension/CommonExtension.kt index a735411144..f3ba843ab7 100644 --- a/plugins/src/main/kotlin/extension/CommonExtension.kt +++ b/plugins/src/main/kotlin/extension/CommonExtension.kt @@ -49,7 +49,7 @@ fun CommonExtension<*, *, *, *>.composeConfig() { } composeOptions { - kotlinCompilerExtensionVersion = "1.3.2" + kotlinCompilerExtensionVersion = "1.4.0" } packagingOptions { diff --git a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt index bdfa1460bf..e134c26f79 100644 --- a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt +++ b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt @@ -32,7 +32,7 @@ fun DependencyHandlerScope.commonDependencies() { * Dependencies used by all the modules with composable items */ fun DependencyHandlerScope.composeDependencies() { - val composeBom = platform("androidx.compose:compose-bom:2022.11.00") + val composeBom = platform("androidx.compose:compose-bom:2023.01.00") implementation(composeBom) androidTestImplementation(composeBom) implementation("androidx.compose.ui:ui") @@ -42,7 +42,6 @@ fun DependencyHandlerScope.composeDependencies() { implementation("androidx.compose.ui:ui-tooling-preview") implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1") implementation("androidx.activity:activity-compose:1.6.1") - implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1") debugImplementation("androidx.compose.ui:ui-tooling") debugImplementation("androidx.compose.ui:ui-test-manifest") implementation("com.airbnb.android:showkase:1.0.0-beta14") From 793530e7883a15b75371ba0cba504d24daacb3d5 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 18 Jan 2023 16:37:00 +0100 Subject: [PATCH 2/3] Use more recent lint version to fix lint false positive. --- gradle.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gradle.properties b/gradle.properties index 27df5e30ca..0585362237 100644 --- a/gradle.properties +++ b/gradle.properties @@ -41,3 +41,7 @@ android.nonTransitiveRClass=true signing.element.nightly.storePassword=Secret signing.element.nightly.keyId=Secret signing.element.nightly.keyPassword=Secret + +# Customise the Lint version to use a more recent version than the one bundled with AGP +# https://googlesamples.github.io/android-custom-lint-rules/usage/newer-lint.md.html +android.experimental.lint.version=8.0.0-alpha10 From f6e2e2fa900368cd4f90345ab340ae1667663cfa Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 18 Jan 2023 16:40:53 +0100 Subject: [PATCH 3/3] Fix typo --- .github/workflows/maestro.yml | 4 ++-- .maestro/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maestro.yml b/.github/workflows/maestro.yml index d3d0962037..0b9939b133 100644 --- a/.github/workflows/maestro.yml +++ b/.github/workflows/maestro.yml @@ -1,4 +1,4 @@ -name: Meastro +name: Maestro on: pull_request: { } @@ -12,7 +12,7 @@ env: jobs: maestro-cloud: - name: Meastro test suite + name: Maestro test suite runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' strategy: diff --git a/.maestro/README.md b/.maestro/README.md index fc2a71d90e..9505769de9 100644 --- a/.maestro/README.md +++ b/.maestro/README.md @@ -43,7 +43,7 @@ Start the ElementX app and run this command to help writing test. maestro studio ``` -Note that sometimes, this prevent running the test. So kill the `meastro studio` process to be able to run the test again. +Note that sometimes, this prevent running the test. So kill the `maestro studio` process to be able to run the test again. Also, if updating the application code, do not forget to deploy again the application before running the maestro tests.