Skip to content

Commit

Permalink
Bump to r8 3.0.73 (#6620)
Browse files Browse the repository at this point in the history
Context: https://r8.googlesource.com/r8/+/refs/tags/3.0.73
Context: https://mvnrepository.com/artifact/com.android.tools/r8/3.0.73

Bump from r8 2.2.64 to 3.0.73.

* [tests] update MultiDexR8ConfigWithNoCodeShrinking

78dd021 introduced the `MultiDexR8ConfigWithNoCodeShrinking(false)`
test that asserts we get the warning:

    R8 : warning : Missing class: java.lang.ClassValue

The latest version of r8 no longer emits this warning, so Google must
have *fixed* something here.

The test still seems useful to build a multi-dex application with a
`@(ProguardConfiguration)` item, so let's drop one test case and just
assert that the warning isn't there. The test is no longer
parameterized.
  • Loading branch information
jonathanpeppers authored Jan 7, 2022
1 parent d91641a commit 862ea39
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
4 changes: 0 additions & 4 deletions Documentation/release-notes/r8-2.2.64.md

This file was deleted.

4 changes: 4 additions & 0 deletions Documentation/release-notes/r8-3.0.73.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### D8/R8 version update to 3.0.73

The version of the [D8 dexer and R8 shrinker](https://r8.googlesource.com/r8)
included in Xamarin.Android has been updated from 2.2.64 to 3.0.73.
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ public void MultiDexAndCodeShrinker ([Values ("proguard", "r8")] string linkTool
}

[Test]
public void MultiDexR8ConfigWithNoCodeShrinking ([Values (true, false)] bool useConfig)
public void MultiDexR8ConfigWithNoCodeShrinking ()
{
var proj = new XamarinAndroidApplicationProject () {
IsRelease = true,
Expand Down Expand Up @@ -1349,20 +1349,15 @@ abstract class ExtendsClassValue extends ClassValue<Boolean> {}
klGRVNULk1GUEsBAhQAFAAICAgAHHONUB4E1g/HAAAAEgEAABcAAAAAAAAAAAAAAAAAugAAAEV4d
GVuZHNDbGFzc1ZhbHVlLmNsYXNzUEsFBgAAAAADAAMAwgAAAMYBAAAAAA==
") });
if (useConfig)
proj.OtherBuildItems.Add (new BuildItem ("ProguardConfiguration", "proguard.cfg") {
TextContent = () => "-dontwarn java.lang.ClassValue"
});
proj.OtherBuildItems.Add (new BuildItem ("ProguardConfiguration", "proguard.cfg") {
TextContent = () => "-dontwarn java.lang.ClassValue"
});
using (var builder = CreateApkBuilder ()) {
Assert.True (builder.Build (proj), "Build should have succeeded.");
string warning = builder.LastBuildOutput
.SkipWhile (x => !x.StartsWith ("Build succeeded.", StringComparison.Ordinal))
.FirstOrDefault (x => x.Contains ("R8 : warning : Missing class: java.lang.ClassValue"));
if (useConfig) {
Assert.IsNull (warning, "Build should have completed without an R8 warning for `java.lang.ClassValue`.");
return;
}
Assert.IsNotNull (warning, "Build should have completed with an R8 warning for `java.lang.ClassValue`.");
Assert.IsNull (warning, "Build should have completed without an R8 warning for `java.lang.ClassValue`.");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/r8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repositories {
}

dependencies {
compile group: 'com.android.tools', name: 'r8', version: '2.2.64'
compile group: 'com.android.tools', name: 'r8', version: '3.0.73'
}

jar {
Expand Down

0 comments on commit 862ea39

Please sign in to comment.