From 2731e9817b620598a7de0f8899612f0e771c9aa4 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 9 Jul 2023 10:44:40 +0200 Subject: [PATCH 1/8] Kotlin 1.9.0 - https://github.com/JetBrains/kotlin/releases/tag/v1.9.0 - https://github.com/google/ksp/releases/tag/1.9.0-1.0.11 - Compose compiler `1.5.0-dev-k1.9.0-6a60475e07f` --- gradle/libs.versions.toml | 6 +++--- settings.gradle.kts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 20afadb36..be13af451 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ androidxActivity = "1.7.0" androidxAppCompat = "1.5.1" androidxBrowser = "1.4.0" androidxComposeBom = "2023.06.01" -androidxComposeCompiler = "1.4.8" +androidxComposeCompiler = "1.5.0-dev-k1.9.0-6a60475e07f" androidxComposeRuntimeTracing = "1.0.0-alpha03" androidxCore = "1.9.0" androidxCoreSplashscreen = "1.0.0" @@ -38,11 +38,11 @@ hilt = "2.46.1" hiltExt = "1.0.0" jacoco = "0.8.7" junit4 = "4.13.2" -kotlin = "1.8.22" +kotlin = "1.9.0" kotlinxCoroutines = "1.6.4" kotlinxDatetime = "0.4.0" kotlinxSerializationJson = "1.5.1" -ksp = "1.8.22-1.0.11" +ksp = "1.9.0-1.0.11" lint = "30.3.1" okhttp = "4.10.0" protobuf = "3.23.0" diff --git a/settings.gradle.kts b/settings.gradle.kts index d0c477b3d..390416cfb 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -28,6 +28,7 @@ dependencyResolutionManagement { repositories { google() mavenCentral() + maven("https://androidx.dev/storage/compose-compiler/repository/") } } rootProject.name = "nowinandroid" From f7ed38182d5fdd101b02279e9aa879b38751154d Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Thu, 25 May 2023 21:17:52 +0200 Subject: [PATCH 2/8] Add protobuf generated sources to the sourceSets And update to version 3.23.4. --- core/datastore/build.gradle.kts | 7 +++++++ gradle/libs.versions.toml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts index a9ec7a78f..d6ca7ebcd 100644 --- a/core/datastore/build.gradle.kts +++ b/core/datastore/build.gradle.kts @@ -52,6 +52,13 @@ protobuf { } } +androidComponents.beforeVariants { + android.sourceSets.register(it.name) { + java.srcDir(buildDir.resolve("generated/source/proto/${it.name}/java")) + kotlin.srcDir(buildDir.resolve("generated/source/proto/${it.name}/kotlin")) + } +} + dependencies { implementation(project(":core:common")) implementation(project(":core:model")) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index be13af451..bb356f006 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -45,7 +45,7 @@ kotlinxSerializationJson = "1.5.1" ksp = "1.9.0-1.0.11" lint = "30.3.1" okhttp = "4.10.0" -protobuf = "3.23.0" +protobuf = "3.23.4" protobufPlugin = "0.9.3" retrofit = "2.9.0" retrofitKotlinxSerializationJson = "1.0.0" From ba82b06cc3cc1a169d8adead9584aea42e3781b7 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 9 Jul 2023 11:22:15 +0200 Subject: [PATCH 3/8] Fix Lint `RememberReturnType` issue with explicit type --- .../com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt b/app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt index 2457af900..1560a74eb 100644 --- a/app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt +++ b/app/src/androidTest/java/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt @@ -183,7 +183,7 @@ class NiaAppStateTest { @Composable private fun rememberTestNavController(): TestNavHostController { val context = LocalContext.current - val navController = remember { + return remember { TestNavHostController(context).apply { navigatorProvider.addNavigator(ComposeNavigator()) graph = createGraph(startDestination = "a") { @@ -193,5 +193,4 @@ private fun rememberTestNavController(): TestNavHostController { } } } - return navController } From bc0a7e63a13bbaf2c0ace7d25e236ad2906cbc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Braun?= Date: Wed, 19 Jul 2023 09:18:51 +0200 Subject: [PATCH 4/8] Update Compose compiler version to 1.5.0 Change-Id: Ieddb8410a592bb38c5764b7288fd4828306d6743 --- gradle/libs.versions.toml | 2 +- settings.gradle.kts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bb356f006..2dd3f379d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ androidxActivity = "1.7.0" androidxAppCompat = "1.5.1" androidxBrowser = "1.4.0" androidxComposeBom = "2023.06.01" -androidxComposeCompiler = "1.5.0-dev-k1.9.0-6a60475e07f" +androidxComposeCompiler = "1.5.0" androidxComposeRuntimeTracing = "1.0.0-alpha03" androidxCore = "1.9.0" androidxCoreSplashscreen = "1.0.0" diff --git a/settings.gradle.kts b/settings.gradle.kts index 390416cfb..d0c477b3d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -28,7 +28,6 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - maven("https://androidx.dev/storage/compose-compiler/repository/") } } rootProject.name = "nowinandroid" From c64fb895b4f3ff09481b33fc6dbc91f51472539d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Braun?= Date: Wed, 19 Jul 2023 09:19:51 +0200 Subject: [PATCH 5/8] Upgrade Hilt to 2.47 Change-Id: I344cb7542107f134b71c62b652211eba370762ec --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2dd3f379d..71b692851 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -34,7 +34,7 @@ firebasePerfPlugin = "1.4.2" gmsPlugin = "4.3.14" googleOss = "17.0.1" googleOssPlugin = "0.10.6" -hilt = "2.46.1" +hilt = "2.47" hiltExt = "1.0.0" jacoco = "0.8.7" junit4 = "4.13.2" From 05e1656ea44b0cdcd7eef726323e6ad980461de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Braun?= Date: Wed, 19 Jul 2023 09:23:14 +0200 Subject: [PATCH 6/8] Update lint to 31.0.2 Change-Id: I11a2cf41f1428931794cf26ebc655ccb0cda33ab --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 71b692851..99248c8bf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -43,7 +43,7 @@ kotlinxCoroutines = "1.6.4" kotlinxDatetime = "0.4.0" kotlinxSerializationJson = "1.5.1" ksp = "1.9.0-1.0.11" -lint = "30.3.1" +lint = "31.0.2" okhttp = "4.10.0" protobuf = "3.23.4" protobufPlugin = "0.9.3" From 3a0ce45c1b791c8507926380d211fa069f5a6a2e Mon Sep 17 00:00:00 2001 From: Don Turner Date: Wed, 19 Jul 2023 10:23:27 +0100 Subject: [PATCH 7/8] Use newer lint version Change-Id: Ifb8f9495a01b4916c3e1ec0cd6ff4bd47080df37 --- gradle.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gradle.properties b/gradle.properties index b57dc01ed..22e1dc72e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -38,3 +38,7 @@ android.nonTransitiveRClass=true # https://developer.android.com/build/releases/gradle-plugin#default-changes android.defaults.buildfeatures.resvalues=false android.defaults.buildfeatures.shaders=false + +# Use newer lint version +# https://googlesamples.github.io/android-custom-lint-rules/usage/newer-lint.md.html +android.experimental.lint.version=8.1.0-rc01 \ No newline at end of file From 5fa8c1d7263526e998cdcd5e14425dc6cffe77ac Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Wed, 19 Jul 2023 12:35:19 +0200 Subject: [PATCH 8/8] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 22e1dc72e..de14513e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -39,6 +39,6 @@ android.nonTransitiveRClass=true android.defaults.buildfeatures.resvalues=false android.defaults.buildfeatures.shaders=false -# Use newer lint version +# Use newer lint version to support Kotlin 1.9 and corresponding kotlinx-metadata-jvm # https://googlesamples.github.io/android-custom-lint-rules/usage/newer-lint.md.html android.experimental.lint.version=8.1.0-rc01 \ No newline at end of file