Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to AGP 8.7.x and Gradle 8.9 #129

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -364,22 +364,22 @@ 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(
AutoNamespaceTransform::class.java,
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
Expand Down Expand Up @@ -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 {
Expand All @@ -526,6 +530,7 @@ class DependencyConfigurator(
apiGeneratorConfiguration.isCanBeResolved = true
params.apiGenerator.setFrom(apiGeneratorConfiguration)
params.buildTools.initialize(
task = null,
projectServices.buildServiceRegistry,
compileSdkHashString,
buildToolsRevision)
Expand Down Expand Up @@ -569,7 +574,7 @@ class DependencyConfigurator(
attribute(AndroidArtifacts.ARTIFACT_TYPE,
AndroidArtifacts.ArtifactType.CLASSES_JAR.type)
}
}.artifacts.artifactFiles.files)
}.artifacts.artifactFiles)
}

fun registerExtractSdkShimTransform(usage: String) {
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -905,7 +910,7 @@ class DependencyConfigurator(
)
)

val d8Version = Version.getVersionString()
val d8Version = R8Version.getVersionString()

allComponents
.mapTo(linkedSetOf()) { it.minSdk.apiLevel }
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Loading