[KeepAnno] Downgrade legacy R8 to match latest AGP 8.0
Bug: b/321674067
Change-Id: I179a5f67b89ebe867841b6868a4dc38e00b68fc0
diff --git a/.gitignore b/.gitignore
index 1c8e875..2f6bfaa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -287,6 +287,8 @@
third_party/r8-releases/2.0.74.tar.gz
third_party/r8-releases/3.2.54
third_party/r8-releases/3.2.54.tar.gz
+third_party/r8-releases/8.0.46
+third_party/r8-releases/8.0.46.tar.gz
third_party/r8mappings
third_party/r8mappings.tar.gz
third_party/remapper
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt b/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
index 474efbe..fe9bd92 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
@@ -584,6 +584,10 @@
"r8-v3-2-54",
Paths.get("third_party", "r8-releases","3.2.54").toFile(),
Paths.get("third_party", "r8-releases", "3.2.54.tar.gz.sha1").toFile())
+ val r8v8_0_46 = ThirdPartyDependency(
+ "r8-v8-0-46",
+ Paths.get("third_party", "r8-releases","8.0.46").toFile(),
+ Paths.get("third_party", "r8-releases", "8.0.46.tar.gz.sha1").toFile())
val retraceBenchmark = ThirdPartyDependency(
"retrace-benchmark",
Paths.get("third_party", "retrace_benchmark").toFile(),
diff --git a/src/test/java/com/android/tools/r8/keepanno/KeepAnnoTestUtils.java b/src/test/java/com/android/tools/r8/keepanno/KeepAnnoTestUtils.java
index b52f72b..176c263 100644
--- a/src/test/java/com/android/tools/r8/keepanno/KeepAnnoTestUtils.java
+++ b/src/test/java/com/android/tools/r8/keepanno/KeepAnnoTestUtils.java
@@ -26,8 +26,9 @@
public static ProguardVersion PG_VERSION = ProguardVersion.V7_4_1;
- // TODO(b/321674067): Downgrade this to oldest supported AGP, such as R8 8.0.35.
- public static Path R8_LIB = Paths.get(ToolHelper.THIRD_PARTY_DIR, "r8", "r8lib_8.2.20-dev.jar");
+ // Track support for R8 version 8.0.46 which is included in AGP 8.0.2
+ public static Path R8_LIB =
+ Paths.get(ToolHelper.THIRD_PARTY_DIR, "r8-releases", "8.0.46", "r8lib.jar");
public static Path getKeepAnnoLib(TemporaryFolder temp) throws IOException {
Path archive = temp.newFolder().toPath().resolve("keepanno.jar");
diff --git a/third_party/r8-releases/8.0.46.tar.gz.sha1 b/third_party/r8-releases/8.0.46.tar.gz.sha1
new file mode 100644
index 0000000..300d3fd
--- /dev/null
+++ b/third_party/r8-releases/8.0.46.tar.gz.sha1
@@ -0,0 +1 @@
+037a4cc645b882ecd6202f84220fd9d81c0a379e
\ No newline at end of file