From 05f8d7c0a4d76f41027067735d1fe6888b051fc2 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 17 Jun 2026 11:46:54 -0500 Subject: [PATCH] [testing] Bump R8 to 9.1.43 Picks up the fix for a NullPointerException in `AndroidApiLevelCompute.of()` that triggers when R8 is invoked with `--no-tree-shaking`. Because 9.1.43 has not yet been published to maven.google.com, `src/r8/build.gradle` now also pulls from the R8 release feed at https://storage.googleapis.com/r8-releases/raw, as described in https://r8.googlesource.com/r8/#replacing-r8-in-agp. See: * https://issuetracker.google.com/issues/524775142 * https://github.com/dotnet/android/issues/11672 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/r8/build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/r8/build.gradle b/src/r8/build.gradle index 5c375e55438..886e040bbd8 100644 --- a/src/r8/build.gradle +++ b/src/r8/build.gradle @@ -12,10 +12,19 @@ java { repositories { google() mavenCentral() + // R8 patch releases newer than what is published to maven.google.com + // are available here. See: https://r8.googlesource.com/r8/#replacing-r8-in-agp + maven { + url 'https://storage.googleapis.com/r8-releases/raw' + } } dependencies { - implementation 'com.android.tools:r8:9.1.31' + // 9.1.43 contains the fix for the NullPointerException in + // AndroidApiLevelCompute.of() when --no-tree-shaking is passed. + // See: https://issuetracker.google.com/issues/524775142 + // See: https://github.com/dotnet/android/issues/11672 + implementation 'com.android.tools:r8:9.1.43' } jar {