From a2e5c46b5619a6a3476220e5b27be060c30b7566 Mon Sep 17 00:00:00 2001 From: Eric Labelle Date: Tue, 17 Sep 2024 07:30:29 -0400 Subject: [PATCH 1/3] Bump to AGP 8.7.x --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2799137..8073b79 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -agp = "8.6.1" # keep in sync with android-tools -android-tools = "31.6.1" # = 23.0.0 + agp +agp = "8.7.0" # keep in sync with android-tools +android-tools = "31.7.0" # = 23.0.0 + agp compilerTesting = "0.2.1" compose = "1.5.14" kotlin = "1.9.24" From 3e39f8392048917c4a650c5231784fba9161d4d4 Mon Sep 17 00:00:00 2001 From: Eric Labelle Date: Tue, 17 Sep 2024 07:46:24 -0400 Subject: [PATCH 2/3] Bump to Gradle 8.9 --- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 017240f..e9d173a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Oct 20 09:50:20 EDT 2022 +#Tue Sep 17 07:31:50 EDT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From ce2d73a591a071bade10c183daeca674c3502394 Mon Sep 17 00:00:00 2001 From: Eric Labelle Date: Tue, 17 Sep 2024 07:52:18 -0400 Subject: [PATCH 3/3] Update copy of DependencyConfigurator.kt --- .../gradle/internal/DependencyConfigurator.kt | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/agp-patch/src/main/kotlin/com/android/build/gradle/internal/DependencyConfigurator.kt b/agp-patch/src/main/kotlin/com/android/build/gradle/internal/DependencyConfigurator.kt index 2b86f2e..4736767 100644 --- a/agp-patch/src/main/kotlin/com/android/build/gradle/internal/DependencyConfigurator.kt +++ b/agp-patch/src/main/kotlin/com/android/build/gradle/internal/DependencyConfigurator.kt @@ -92,8 +92,8 @@ import com.android.build.gradle.options.BooleanOption import com.android.build.gradle.options.StringOption import com.android.build.gradle.options.SyncOptions import com.android.builder.core.BuilderConstants +import com.android.builder.dexing.R8Version import com.android.repository.Revision -import com.android.tools.r8.Version import com.google.common.collect.Maps import org.gradle.api.ActionConfiguration import org.gradle.api.Project @@ -287,7 +287,7 @@ class DependencyConfigurator( AndroidArtifacts.ArtifactType.EXPLODED_AAR, AndroidArtifacts.ArtifactType.COMPILED_DEPENDENCIES_RESOURCES ) { params -> - projectServices.initializeAapt2Input(params.aapt2) + projectServices.initializeAapt2Input(params.aapt2, task = null) } } // API Jar: Produce a single API jar that can also contain the library R class from the AAR @@ -364,14 +364,14 @@ class DependencyConfigurator( AndroidArtifacts.ArtifactType.MAYBE_NON_NAMESPACED_PROCESSED_AAR, AndroidArtifacts.ArtifactType.PREPROCESSED_AAR_FOR_AUTO_NAMESPACE ) { params -> - projectServices.initializeAapt2Input(params.aapt2) + projectServices.initializeAapt2Input(params.aapt2, task = null) } registerTransform( AutoNamespacePreProcessTransform::class.java, AndroidArtifacts.ArtifactType.JAR, AndroidArtifacts.ArtifactType.PREPROCESSED_AAR_FOR_AUTO_NAMESPACE ) { params -> - projectServices.initializeAapt2Input(params.aapt2) + projectServices.initializeAapt2Input(params.aapt2, task = null) } registerTransform( @@ -379,7 +379,7 @@ class DependencyConfigurator( AndroidArtifacts.ArtifactType.PREPROCESSED_AAR_FOR_AUTO_NAMESPACE, AndroidArtifacts.ArtifactType.PROCESSED_AAR ) { params -> - projectServices.initializeAapt2Input(params.aapt2) + projectServices.initializeAapt2Input(params.aapt2, task = null) } } // Transform to go from external jars to CLASSES and JAVA_RES artifacts. This returns the @@ -513,6 +513,10 @@ class DependencyConfigurator( MavenCoordinates.ORG_JETBRAINS_KOTLIN_KOTLIN_STDLIB.toString(), MavenCoordinates.ORG_JETBRAINS_KOTLINX_KOTLINX_COROUTINES_ANDROID.toString(), MavenCoordinates.ANDROIDX_PRIVACYSANDBOX_UI_UI_CORE.toString(), + MavenCoordinates.ANDROIDX_CORE_CORE_KTX.toString(), + MavenCoordinates.ANDROIDX_PRIVACYSANDBOX_ACTIVITY_ACTIVITY_CORE.toString(), + MavenCoordinates.ANDROIDX_PRIVACYSANDBOX_ACTIVITY_ACTIVITY_PROVIDER.toString(), + MavenCoordinates.ANDROIDX_PRIVACYSANDBOX_ACTIVITY_ACTIVITY_CLIENT.toString(), MavenCoordinates.ANDROIDX_PRIVACYSANDBOX_UI_UI_CLIENT.toString(), )) .map { @@ -526,6 +530,7 @@ class DependencyConfigurator( apiGeneratorConfiguration.isCanBeResolved = true params.apiGenerator.setFrom(apiGeneratorConfiguration) params.buildTools.initialize( + task = null, projectServices.buildServiceRegistry, compileSdkHashString, buildToolsRevision) @@ -569,7 +574,7 @@ class DependencyConfigurator( attribute(AndroidArtifacts.ARTIFACT_TYPE, AndroidArtifacts.ArtifactType.CLASSES_JAR.type) } - }.artifacts.artifactFiles.files) + }.artifacts.artifactFiles) } fun registerExtractSdkShimTransform(usage: String) { @@ -658,7 +663,7 @@ class DependencyConfigurator( AndroidArtifacts.ArtifactType.ANDROID_PRIVACY_SANDBOX_SDK_ARCHIVE, AndroidArtifacts.ArtifactType.ANDROID_PRIVACY_SANDBOX_SDK_APKS ) { params -> - projectServices.initializeAapt2Input(params.aapt2) + projectServices.initializeAapt2Input(params.aapt2, task = null) params.signingConfigData.set(signingConfigProvider) params.signingConfigValidationResultDir.set( @@ -905,7 +910,7 @@ class DependencyConfigurator( ) ) - val d8Version = Version.getVersionString() + val d8Version = R8Version.getVersionString() allComponents .mapTo(linkedSetOf()) { it.minSdk.apiLevel }