From 98f1f63a6000ed7ef5242945cab0392a8552e615 Mon Sep 17 00:00:00 2001 From: Rick Busarow Date: Thu, 28 Sep 2023 06:56:26 -0500 Subject: [PATCH] Gradle `8.3` and AGP `7.3.1` The AGP update becomes necessary in order to resolve: ``` Could not determine the dependencies of task ':sample:app:testDebugUnitTest'. > Could not create task ':sample:app:processDebugResources'. > Cannot use @TaskAction annotation on method IncrementalTask.taskAction$gradle_core() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method. ``` --- gradle/libs.versions.toml | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- integration-tests/mpp/android-module/build.gradle | 13 ++++++++++--- sample/app/build.gradle | 4 ++-- sample/app/src/main/AndroidManifest.xml | 1 - 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 64dcd46c5..be9f80f84 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ # [versions] -agp = "7.1.0" +agp = "7.3.1" autoService = "1.1.1" autoValue = "1.10.1" dagger = "2.46.1" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f398c33c4..03bc51504 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/integration-tests/mpp/android-module/build.gradle b/integration-tests/mpp/android-module/build.gradle index a10a15ac2..220f72983 100644 --- a/integration-tests/mpp/android-module/build.gradle +++ b/integration-tests/mpp/android-module/build.gradle @@ -21,8 +21,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } lint { @@ -37,7 +37,14 @@ android { } kotlin { - android() + + // The `android()` target is deprecated in Kotlin 1.9.0+, + // but the new `androidTarget()` alternative doesn't exist in KGP 1.8.x. + if (kotlin.coreLibrariesVersion < "1.9.0") + android() + else { + androidTarget() + } sourceSets { androidMain { diff --git a/sample/app/build.gradle b/sample/app/build.gradle index 60ca69a2b..8eb5d160c 100644 --- a/sample/app/build.gradle +++ b/sample/app/build.gradle @@ -22,8 +22,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } lint { diff --git a/sample/app/src/main/AndroidManifest.xml b/sample/app/src/main/AndroidManifest.xml index 5bb78b0a0..3270de606 100644 --- a/sample/app/src/main/AndroidManifest.xml +++ b/sample/app/src/main/AndroidManifest.xml @@ -3,7 +3,6 @@