Skip to content

[testing] Bump R8 to 9.1.43#11688

Draft
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers/r8-9-1-43
Draft

[testing] Bump R8 to 9.1.43#11688
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers/r8-9-1-43

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

⚠️ For testing only — not intended to merge as-is.

Bumps the R8/D8 shipped in .NET for Android from 9.1.319.1.43.

Why

R8 9.1.31 throws a NullPointerException in AndroidApiLevelCompute.of() when invoked with --no-tree-shaking. Google's R8 team fixed this in 9.1.43.

How

9.1.43 is a stable tagged R8 release, but it has not yet been published to maven.google.com (which still tops out at 9.1.31). It is published on the R8 team's own release feed at https://storage.googleapis.com/r8-releases/raw, which is the channel Google's R8 docs point users at for exactly this case — see Replacing R8 in AGP.

src/r8/build.gradle now:

  1. Adds https://storage.googleapis.com/r8-releases/raw as a maven repository (after google() and mavenCentral(), so Google Maven is still preferred when a version is available there).
  2. Bumps the dependency to com.android.tools:r8:9.1.43.

Verification

Built locally via the existing gradle build that backs src/r8/r8.csproj:

> Task :jar
BUILD SUCCESSFUL in 9s

And confirmed the produced fat-jar reports the right version:

$ java -cp src/r8/build/libs/r8.jar com.android.tools.r8.R8 --version
R8 9.1.43 (build 97a09ffd53fb2082ad69827578fed444da540740 from go/r8bot ...)
$ java -cp src/r8/build/libs/r8.jar com.android.tools.r8.D8 --version
D8 9.1.43 (build 97a09ffd53fb2082ad69827578fed444da540740 from go/r8bot ...)

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
  * #11672

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant