From 82415674f53a17cda11bb6a9b71b1b8e3da6da2c Mon Sep 17 00:00:00 2001 From: Jiayan Lin Date: Wed, 28 Feb 2024 10:19:23 -0800 Subject: [PATCH] Replace //external:android/d8_jar_import with "@android_gmaven_r8//jar" When android sdk is defined, android_sdk_repository maps //external:android/d8_jar_import to androidsdk//:d8_jar_import, which refers to android_gmaven_r8//jar:jar. PiperOrigin-RevId: 611144488 Change-Id: I4ee5945ce5a1fdb30e96775396ec3628cefaa2e8 --- src/test/java/com/google/devtools/build/android/r8/BUILD | 8 ++------ .../java/com/google/devtools/build/android/r8/BUILD | 6 ++---- .../java/com/google/devtools/build/android/r8/BUILD.tools | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/test/java/com/google/devtools/build/android/r8/BUILD b/src/test/java/com/google/devtools/build/android/r8/BUILD index c52bc6102ffff5..2e60ca3ac8f28c 100644 --- a/src/test/java/com/google/devtools/build/android/r8/BUILD +++ b/src/test/java/com/google/devtools/build/android/r8/BUILD @@ -36,13 +36,9 @@ java_library( "//third_party:guava", "//third_party:junit4", "//third_party:truth", + "@android_gmaven_r8//jar", "@bazel_tools//tools/java/runfiles", - ] + select({ - "//external:has_androidsdk": [ - "//external:android/d8_jar_import", - ], - "//conditions:default": [], - }), + ], ) java_test( diff --git a/src/tools/android/java/com/google/devtools/build/android/r8/BUILD b/src/tools/android/java/com/google/devtools/build/android/r8/BUILD index c0701712c0f74f..361cb910e1e85b 100644 --- a/src/tools/android/java/com/google/devtools/build/android/r8/BUILD +++ b/src/tools/android/java/com/google/devtools/build/android/r8/BUILD @@ -51,10 +51,8 @@ java_library( "//third_party:auto_value", "//third_party:guava", "//third_party:jsr305", - ] + select({ - "//external:has_androidsdk": ["//external:android/d8_jar_import"], - "//conditions:default": [], - }), + "@android_gmaven_r8//jar", + ], ) java_library( diff --git a/src/tools/android/java/com/google/devtools/build/android/r8/BUILD.tools b/src/tools/android/java/com/google/devtools/build/android/r8/BUILD.tools index 643a8d4c7951d1..1567b9215cac53 100644 --- a/src/tools/android/java/com/google/devtools/build/android/r8/BUILD.tools +++ b/src/tools/android/java/com/google/devtools/build/android/r8/BUILD.tools @@ -4,7 +4,7 @@ java_library( name = "r8", srcs = glob(["*.java", "desugar/*.java"]), deps = [ - "//external:android/d8_jar_import", + "@android_gmaven_r8//jar", "//src/tools/android/java/com/google/devtools/build/android:all_android_tools", ], plugins = ["auto_value_plugin"],