From bc476884ce22487bd9d8726be0a842bab93d80ce Mon Sep 17 00:00:00 2001 From: Edbert Chan Date: Fri, 8 Apr 2022 16:41:41 -0700 Subject: [PATCH] Replacing Compat Dx With Reference To Internal Bazel Build --- .../java/com/google/devtools/build/android/r8/BUILD.tools | 7 +++++++ tools/android/android_sdk_repository_template.bzl | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) 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 1b46a5a7455de4..bbe2cd568cba78 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 @@ -22,3 +22,10 @@ java_binary( visibility = ["//tools/android:__subpackages__"], runtime_deps = [":r8"], ) + +java_binary( + name = "r8_binary", + main_class = "com.google.devtools.build.android.r8.CompatDx", + visibility = ["@androidsdk//:__subpackages__", "//tools/android:__subpackages__"], + runtime_deps = [":r8"], +) \ No newline at end of file diff --git a/tools/android/android_sdk_repository_template.bzl b/tools/android/android_sdk_repository_template.bzl index 170d97ab0532eb..1719f727a97004 100644 --- a/tools/android/android_sdk_repository_template.bzl +++ b/tools/android/android_sdk_repository_template.bzl @@ -296,10 +296,9 @@ def create_android_sdk_rules( name = "dx_jar_import", jars = ["build-tools/%s/lib/dx.jar" % build_tools_directory], ) - java_binary( + native.alias( name = "d8_compat_dx", - main_class = "com.android.tools.r8.compatdx.CompatDx", - runtime_deps = [":d8_jar_import"], + actual = "@bazel_tools//src/tools/android/java/com/google/devtools/build/android/r8:r8_binary" ) java_import( name = "d8_jar_import",