From ac056ca7fc2d5f18aba9af6a1bbd3e53b0ab0e3e Mon Sep 17 00:00:00 2001 From: andreykovalev Date: Fri, 12 Apr 2024 11:18:25 +0100 Subject: [PATCH 1/7] Update compose version and kotlin --- gradle/libs.versions.toml | 10 +++++----- .../appyx/interop/rx2/connectable/NodeConnector.kt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 91fa9554f..8b391599d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,19 +1,19 @@ # keep sorted please, use Edit -> Sort Lines [versions] -androidCompileSdk = "33" +androidCompileSdk = "34" androidMinSdk = "21" -androidTargetSdk = "32" +androidTargetSdk = "34" accompanist = "0.28.0" androidx-lifecycle = "2.6.1" androidx-navigation-compose = "2.5.1" coil = "2.2.1" -composeBom = "2023.05.01" -composeCompiler = "1.4.4" +composeBom = "2024.04.00" +composeCompiler = "1.5.11" ribs = "0.39.0" mvicore = "1.2.6" coroutines = "1.6.4" -kotlin = "1.8.10" +kotlin = "1.9.23" junit5 = "5.8.2" detekt = "1.22.0" dependencyAnalysis = "1.13.1" diff --git a/libraries/interop-rx2/src/main/kotlin/com/bumble/appyx/interop/rx2/connectable/NodeConnector.kt b/libraries/interop-rx2/src/main/kotlin/com/bumble/appyx/interop/rx2/connectable/NodeConnector.kt index 88b74ad2a..67e6dd645 100644 --- a/libraries/interop-rx2/src/main/kotlin/com/bumble/appyx/interop/rx2/connectable/NodeConnector.kt +++ b/libraries/interop-rx2/src/main/kotlin/com/bumble/appyx/interop/rx2/connectable/NodeConnector.kt @@ -6,7 +6,7 @@ import com.jakewharton.rxrelay2.PublishRelay import com.jakewharton.rxrelay2.Relay import io.reactivex.Observer -class NodeConnector( +class NodeConnector( override val input: Relay = PublishRelay.create(), ) : Connectable { From dcb31e2653d43e7be5ec88d13bcfc4ba557786a4 Mon Sep 17 00:00:00 2001 From: andreykovalev Date: Fri, 12 Apr 2024 11:22:05 +0100 Subject: [PATCH 2/7] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25e7f55fc..ac579037a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## Pending changes --- +- [#693](https://github.com/bumble-tech/appyx/pull/693) – **Updated**: Compose BOM version and kotlin version + +--- ## 1.4.1-migrate-2.x From c29e6fac48f0d508fb81bdcaa3757b88102ed79f Mon Sep 17 00:00:00 2001 From: andreykovalev Date: Mon, 15 Apr 2024 11:07:17 +0100 Subject: [PATCH 3/7] Update agp and JVM target --- gradle/libs.versions.toml | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- libraries/core/build.gradle.kts | 10 ++++++++++ libraries/customisations/build.gradle.kts | 11 +++++++++-- libraries/interop-ribs/build.gradle.kts | 9 +++++++++ libraries/interop-rx2/build.gradle.kts | 9 +++++++++ libraries/interop-rx3/build.gradle.kts | 9 +++++++++ libraries/testing-junit4/build.gradle.kts | 9 +++++++++ libraries/testing-junit5/build.gradle.kts | 9 +++++++++ libraries/testing-ui-activity/build.gradle.kts | 9 +++++++++ libraries/testing-ui/build.gradle.kts | 9 +++++++++ libraries/testing-unit-common/build.gradle.kts | 9 +++++++++ plugins/publish-plugin/build.gradle.kts | 9 ++++++++- plugins/release-dependencies-diff/build.gradle.kts | 13 +++++++++++-- .../kotlin/ReleaseDependenciesCreateFilesTask.kt | 7 ++++--- .../main/kotlin/ReleaseDependenciesDiffFilesTask.kt | 4 ++-- plugins/verification-plugin/build.gradle.kts | 9 ++++++++- .../src/main/kotlin/LintPlugin.kt | 3 ++- samples/app/build.gradle.kts | 10 ++++++++++ .../appyx/app/node/backstack/app/ChildNode.kt | 2 +- samples/common/build.gradle.kts | 9 +++++++++ samples/navigation-compose/build.gradle.kts | 10 ++++++++++ samples/navmodel-samples/build.gradle.kts | 10 ++++++++++ samples/sandbox/build.gradle.kts | 10 ++++++++++ settings.gradle.kts | 2 -- 25 files changed, 179 insertions(+), 18 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8b391599d..b08607b23 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,7 +16,7 @@ coroutines = "1.6.4" kotlin = "1.9.23" junit5 = "5.8.2" detekt = "1.22.0" -dependencyAnalysis = "1.13.1" +dependencyAnalysis = "1.31.0" [libraries] androidx-activity-compose = "androidx.activity:activity-compose:1.7.2" @@ -74,7 +74,7 @@ junit-vintage = { module = "org.junit.vintage:junit-vintage-engine", version.ref plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } plugin-detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" } -plugin-android = "com.android.tools.build:gradle:7.4.2" +plugin-android = "com.android.tools.build:gradle:8.2.2" detekt-compose = "io.nlopez.compose.rules:detekt:0.1.5" toolargetool = "com.gu.android:toolargetool:0.3.0" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8fad3f5a9..fce403e45 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libraries/core/build.gradle.kts b/libraries/core/build.gradle.kts index 388839946..663f56662 100644 --- a/libraries/core/build.gradle.kts +++ b/libraries/core/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -19,6 +21,14 @@ android { } buildFeatures { compose = true + buildConfig = true + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() } composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() diff --git a/libraries/customisations/build.gradle.kts b/libraries/customisations/build.gradle.kts index 0507a4f47..eb3e9fa71 100644 --- a/libraries/customisations/build.gradle.kts +++ b/libraries/customisations/build.gradle.kts @@ -1,3 +1,6 @@ +import org.jetbrains.kotlin.config.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile + plugins { id("java-library") id("kotlin") @@ -6,8 +9,12 @@ plugins { } java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} + +tasks.withType(KotlinJvmCompile::class.java).configureEach { + kotlinOptions.jvmTarget = JvmTarget.JVM_11.toString() } tasks.test { diff --git a/libraries/interop-ribs/build.gradle.kts b/libraries/interop-ribs/build.gradle.kts index bbfc3a923..3543839c1 100644 --- a/libraries/interop-ribs/build.gradle.kts +++ b/libraries/interop-ribs/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -23,6 +25,13 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/libraries/interop-rx2/build.gradle.kts b/libraries/interop-rx2/build.gradle.kts index 86db0b1bd..5ada0d92c 100644 --- a/libraries/interop-rx2/build.gradle.kts +++ b/libraries/interop-rx2/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -21,6 +23,13 @@ android { it.useJUnitPlatform() } } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/libraries/interop-rx3/build.gradle.kts b/libraries/interop-rx3/build.gradle.kts index e86b27b40..30707bacd 100644 --- a/libraries/interop-rx3/build.gradle.kts +++ b/libraries/interop-rx3/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -21,6 +23,13 @@ android { it.useJUnitPlatform() } } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/libraries/testing-junit4/build.gradle.kts b/libraries/testing-junit4/build.gradle.kts index 53724c0a7..f7d6969a5 100644 --- a/libraries/testing-junit4/build.gradle.kts +++ b/libraries/testing-junit4/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -22,6 +24,13 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/libraries/testing-junit5/build.gradle.kts b/libraries/testing-junit5/build.gradle.kts index 4932f8d2b..a9f5b34dd 100644 --- a/libraries/testing-junit5/build.gradle.kts +++ b/libraries/testing-junit5/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -27,6 +29,13 @@ android { excludes += setOf("META-INF/LICENSE.md", "META-INF/LICENSE-notice.md") } } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/libraries/testing-ui-activity/build.gradle.kts b/libraries/testing-ui-activity/build.gradle.kts index 19d088209..35cac02f3 100644 --- a/libraries/testing-ui-activity/build.gradle.kts +++ b/libraries/testing-ui-activity/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -20,6 +22,13 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/libraries/testing-ui/build.gradle.kts b/libraries/testing-ui/build.gradle.kts index edd28986b..ef7d0021b 100644 --- a/libraries/testing-ui/build.gradle.kts +++ b/libraries/testing-ui/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -22,6 +24,13 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/libraries/testing-unit-common/build.gradle.kts b/libraries/testing-unit-common/build.gradle.kts index 3b30ccc38..2201965fa 100644 --- a/libraries/testing-unit-common/build.gradle.kts +++ b/libraries/testing-unit-common/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -22,6 +24,13 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/plugins/publish-plugin/build.gradle.kts b/plugins/publish-plugin/build.gradle.kts index 5d3e6da86..10728ff46 100644 --- a/plugins/publish-plugin/build.gradle.kts +++ b/plugins/publish-plugin/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { `java-gradle-plugin` `kotlin-dsl` @@ -9,8 +11,13 @@ dependencies { implementation(libs.plugin.kotlin) } +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} + tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile::class.java).configureEach { - kotlinOptions.jvmTarget = JavaVersion.VERSION_11.name + kotlinOptions.jvmTarget = JvmTarget.JVM_11.toString() } detekt { diff --git a/plugins/release-dependencies-diff/build.gradle.kts b/plugins/release-dependencies-diff/build.gradle.kts index 213d1b5f9..7b5da2eab 100644 --- a/plugins/release-dependencies-diff/build.gradle.kts +++ b/plugins/release-dependencies-diff/build.gradle.kts @@ -1,3 +1,6 @@ +import org.jetbrains.kotlin.config.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile + plugins { `java-gradle-plugin` `kotlin-dsl` @@ -8,8 +11,14 @@ dependencies { implementation(libs.plugin.kotlin) } -tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile::class.java).configureEach { - kotlinOptions.jvmTarget = JavaVersion.VERSION_11.name + +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} + +tasks.withType(KotlinJvmCompile::class.java).configureEach { + kotlinOptions.jvmTarget = JvmTarget.JVM_11.toString() } detekt { diff --git a/plugins/release-dependencies-diff/src/main/kotlin/ReleaseDependenciesCreateFilesTask.kt b/plugins/release-dependencies-diff/src/main/kotlin/ReleaseDependenciesCreateFilesTask.kt index 36bf3a255..2db88af40 100644 --- a/plugins/release-dependencies-diff/src/main/kotlin/ReleaseDependenciesCreateFilesTask.kt +++ b/plugins/release-dependencies-diff/src/main/kotlin/ReleaseDependenciesCreateFilesTask.kt @@ -1,3 +1,4 @@ + import org.gradle.api.Project import org.gradle.api.tasks.Input import org.gradle.api.tasks.diagnostics.DependencyReportTask @@ -13,7 +14,8 @@ abstract class ReleaseDependenciesCreateFilesTask : DependencyReportTask() { ) var directoryName: String? = null - override fun generate(project: Project) { + + override fun calculateReportModelFor(project: Project): DependencyReportModel { val isJavaLibrary = project.plugins.hasPlugin("java") val isAndroidLibrary = @@ -24,11 +26,10 @@ abstract class ReleaseDependenciesCreateFilesTask : DependencyReportTask() { // don't have any code or build.gradle files. if (isAndroidLibrary) { setConfiguration("releaseRuntimeClasspath") - super.generate(project) } else if (isJavaLibrary) { setConfiguration("runtimeClasspath") - super.generate(project) } + return super.calculateReportModelFor(project) } override fun getOutputFile(): File? { diff --git a/plugins/release-dependencies-diff/src/main/kotlin/ReleaseDependenciesDiffFilesTask.kt b/plugins/release-dependencies-diff/src/main/kotlin/ReleaseDependenciesDiffFilesTask.kt index b8c07a028..7fad435c1 100644 --- a/plugins/release-dependencies-diff/src/main/kotlin/ReleaseDependenciesDiffFilesTask.kt +++ b/plugins/release-dependencies-diff/src/main/kotlin/ReleaseDependenciesDiffFilesTask.kt @@ -1,10 +1,10 @@ + import org.gradle.api.DefaultTask import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.Input import org.gradle.api.tasks.OutputFile import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.options.Option -import org.gradle.kotlin.dsl.support.appendReproducibleNewLine import java.io.ByteArrayOutputStream import java.io.File @@ -104,6 +104,6 @@ abstract class ReleaseDependenciesDiffFilesTask : DefaultTask() { appendLine(projectName) appendLine("=========================================") resultLines.onEach(::appendLine) - appendReproducibleNewLine() + appendLine() } } diff --git a/plugins/verification-plugin/build.gradle.kts b/plugins/verification-plugin/build.gradle.kts index e794e0fc0..682ac5500 100644 --- a/plugins/verification-plugin/build.gradle.kts +++ b/plugins/verification-plugin/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { `java-gradle-plugin` `kotlin-dsl` @@ -9,8 +11,13 @@ dependencies { implementation(libs.plugin.detekt) } +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} + tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile::class.java).configureEach { - kotlinOptions.jvmTarget = JavaVersion.VERSION_11.name + kotlinOptions.jvmTarget = JvmTarget.JVM_11.toString() } detekt { diff --git a/plugins/verification-plugin/src/main/kotlin/LintPlugin.kt b/plugins/verification-plugin/src/main/kotlin/LintPlugin.kt index 388212e3a..439572cac 100644 --- a/plugins/verification-plugin/src/main/kotlin/LintPlugin.kt +++ b/plugins/verification-plugin/src/main/kotlin/LintPlugin.kt @@ -1,3 +1,4 @@ + import com.android.build.api.dsl.CommonExtension import com.android.build.gradle.internal.lint.AndroidLintTask import io.gitlab.arturbosch.detekt.report.ReportMergeTask @@ -16,7 +17,7 @@ class LintPlugin : Plugin { } private fun collectLintSarif(target: Project) { - target.extensions.configure>("android") { + target.extensions.configure>("android") { lint { sarifReport = true baseline = target.file("lint-baseline.xml") diff --git a/samples/app/build.gradle.kts b/samples/app/build.gradle.kts index c81dc54ca..cdc902576 100644 --- a/samples/app/build.gradle.kts +++ b/samples/app/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.application") id("kotlin-android") @@ -50,6 +52,14 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/samples/app/src/main/kotlin/com/bumble/appyx/app/node/backstack/app/ChildNode.kt b/samples/app/src/main/kotlin/com/bumble/appyx/app/node/backstack/app/ChildNode.kt index 7a8d5c758..0e5a2a8ec 100644 --- a/samples/app/src/main/kotlin/com/bumble/appyx/app/node/backstack/app/ChildNode.kt +++ b/samples/app/src/main/kotlin/com/bumble/appyx/app/node/backstack/app/ChildNode.kt @@ -14,7 +14,7 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.bumble.appyx.R +import com.bumble.appyx.samples.common.R import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node diff --git a/samples/common/build.gradle.kts b/samples/common/build.gradle.kts index befa4b11c..4d2ae1196 100644 --- a/samples/common/build.gradle.kts +++ b/samples/common/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -22,6 +24,13 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/samples/navigation-compose/build.gradle.kts b/samples/navigation-compose/build.gradle.kts index a4e46e6d2..e056d1a2f 100644 --- a/samples/navigation-compose/build.gradle.kts +++ b/samples/navigation-compose/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -31,6 +33,14 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/samples/navmodel-samples/build.gradle.kts b/samples/navmodel-samples/build.gradle.kts index 1d65feb8d..d2acb4772 100644 --- a/samples/navmodel-samples/build.gradle.kts +++ b/samples/navmodel-samples/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.library") id("kotlin-android") @@ -22,6 +24,14 @@ android { composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/samples/sandbox/build.gradle.kts b/samples/sandbox/build.gradle.kts index 017c861b7..cff15557b 100644 --- a/samples/sandbox/build.gradle.kts +++ b/samples/sandbox/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.config.JvmTarget + plugins { id("com.android.application") id("kotlin-android") @@ -44,6 +46,14 @@ android { it.useJUnitPlatform() } } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JvmTarget.JVM_11.toString() + } } dependencies { diff --git a/settings.gradle.kts b/settings.gradle.kts index 572d5c682..c0ce46078 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,8 +14,6 @@ dependencyResolutionManagement { } } -enableFeaturePreview("VERSION_CATALOGS") - include( ":libraries:core", ":libraries:customisations", From 35cada58898e6098b3db72f94f5eb1d03e0028c8 Mon Sep 17 00:00:00 2001 From: andreykovalev Date: Mon, 15 Apr 2024 11:16:19 +0100 Subject: [PATCH 4/7] Update java --- .github/workflows/build.yml | 4 ++-- .github/workflows/post_merge.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7137db509..5057431c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - uses: gradle/wrapper-validation-action@v2 - uses: gradle/actions/setup-gradle@v3 with: @@ -81,7 +81,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - uses: gradle/wrapper-validation-action@v2 - uses: gradle/actions/setup-gradle@v3 with: diff --git a/.github/workflows/post_merge.yml b/.github/workflows/post_merge.yml index 002311f81..49ab228e5 100644 --- a/.github/workflows/post_merge.yml +++ b/.github/workflows/post_merge.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - uses: gradle/wrapper-validation-action@v2 - uses: gradle/actions/setup-gradle@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1527d3472..92ca2935f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - uses: gradle/wrapper-validation-action@v2 - uses: gradle/actions/setup-gradle@v3 env: From df43eb7ecc660daad29b3dcc5461b5f34bf2b5b7 Mon Sep 17 00:00:00 2001 From: andreykovalev Date: Mon, 15 Apr 2024 11:44:40 +0100 Subject: [PATCH 5/7] Update lint version and baselines --- gradle.properties | 1 + libraries/core/lint-baseline.xml | 8 +-- samples/app/lint-baseline.xml | 37 +++++++++- samples/common/lint-baseline.xml | 116 +++++------------------------- samples/sandbox/lint-baseline.xml | 35 ++++++++- 5 files changed, 93 insertions(+), 104 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1066de3e0..9ff0bbcbc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,3 +4,4 @@ org.gradle.parallel=true android.useAndroidX=true kotlin.code.style=official library.version=1.4.1-migrate-2.x +android.experimental.lint.version=8.3.0 diff --git a/libraries/core/lint-baseline.xml b/libraries/core/lint-baseline.xml index 47fdd2657..6a699e471 100644 --- a/libraries/core/lint-baseline.xml +++ b/libraries/core/lint-baseline.xml @@ -1,5 +1,5 @@ - + @@ -19,7 +19,7 @@ errorLine2=" ~~~~~~~~"> @@ -30,7 +30,7 @@ errorLine2=" ~~~~~~~~~"> diff --git a/samples/app/lint-baseline.xml b/samples/app/lint-baseline.xml index 0ddcfc0b6..8343c7e75 100644 --- a/samples/app/lint-baseline.xml +++ b/samples/app/lint-baseline.xml @@ -1,5 +1,5 @@ - + + + + + + + + + + + + + diff --git a/samples/common/lint-baseline.xml b/samples/common/lint-baseline.xml index 84f61b024..cbbbfc846 100644 --- a/samples/common/lint-baseline.xml +++ b/samples/common/lint-baseline.xml @@ -1,81 +1,46 @@ - + - - - - + id="IconLocation" + message="Found bitmap drawable `res/drawable/halloween10.jpeg` in densityless folder"> + file="src/main/res/drawable/halloween10.jpeg"/> + id="IconLocation" + message="Found bitmap drawable `res/drawable/halloween11.jpeg` in densityless folder"> + file="src/main/res/drawable/halloween11.jpeg"/> + id="IconLocation" + message="Found bitmap drawable `res/drawable/halloween12.jpeg` in densityless folder"> + file="src/main/res/drawable/halloween12.jpeg"/> + id="IconLocation" + message="Found bitmap drawable `res/drawable/halloween13.jpeg` in densityless folder"> + file="src/main/res/drawable/halloween13.jpeg"/> + id="IconLocation" + message="Found bitmap drawable `res/drawable/halloween14.jpeg` in densityless folder"> + file="src/main/res/drawable/halloween14.jpeg"/> + id="IconLocation" + message="Found bitmap drawable `res/drawable/halloween15.jpeg` in densityless folder"> + file="src/main/res/drawable/halloween15.jpeg"/> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/sandbox/lint-baseline.xml b/samples/sandbox/lint-baseline.xml index e19136970..5f1e0b651 100644 --- a/samples/sandbox/lint-baseline.xml +++ b/samples/sandbox/lint-baseline.xml @@ -1,5 +1,38 @@ - + + + + + + + + + + + + + Date: Mon, 15 Apr 2024 12:08:13 +0100 Subject: [PATCH 6/7] Add proguard rules --- samples/app/proguard-rules.pro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/app/proguard-rules.pro b/samples/app/proguard-rules.pro index e69de29bb..efb628c5d 100644 --- a/samples/app/proguard-rules.pro +++ b/samples/app/proguard-rules.pro @@ -0,0 +1,4 @@ +-dontwarn okhttp3.internal.platform.** +-dontwarn org.conscrypt.** +-dontwarn org.bouncycastle.** +-dontwarn org.openjsse.** From e8b4571becdd8fd5c25ef12965ae372706e87529 Mon Sep 17 00:00:00 2001 From: andreykovalev Date: Mon, 15 Apr 2024 17:49:30 +0100 Subject: [PATCH 7/7] Configure dependencyAnalysis for all projects --- build.gradle.kts | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8cbfba434..b925251af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,12 +32,37 @@ dependencyAnalysis { // Needed for compose '@Preview'. The annotation is actually within // androidx.compose.ui:ui-tooling-preview, hence the need to exclude. "androidx.compose.ui:ui-tooling", + "androidx.test.ext:junit", // This is used to add the testing activity to the debug manifest // However since not code is referenced, it is raised as unused. - ":libraries:testing-ui-activity" + ":libraries:testing-ui-activity", + ":libraries:testing-ui" ) } + onRuntimeOnly { + exclude("org.jetbrains.kotlinx:kotlinx-coroutines-android") + } + } + project(":libraries:interop-ribs") { + onAny { + severity("ignore") + } + } + project(":samples:app") { + onAny { + severity("ignore") + } + } + project(":samples:navigation-compose") { + onAny { + severity("ignore") + } + } + project(":samples:sandbox") { + onAny { + severity("ignore") + } } project(":libraries:testing-junit4") { onUnusedDependencies {