Add sdk/tools/BUILD.bazel to mark tools folder as a Bazel subpackage.
This allows us to update the hardcoded paths in sdk/BUILD.bazel to acknowledge the subpackage, even though bp2build is not converting the sdk/tools/Android.bp file yet.
Test: bazel build //prebuilts/sdk/...
Test: bp2build-sync.py write; bazel build //bionic/...
Change-Id: I29f1b91d57d92855c917c75bd87a9de3a68e8711
diff --git a/BUILD.bazel b/BUILD.bazel
index 5c6084c..3669a9a 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -1,35 +1,33 @@
load("@rules_android//toolchains/android:toolchain.bzl", "android_toolchain")
-exports_files(["tools/linux/bin/aapt2"])
-
android_sdk(
name = "android_sdk",
- aapt = "tools/linux/bin/aapt",
- aapt2 = "tools/linux/bin/aapt2",
+ aapt = "//prebuilts/sdk/tools:linux/bin/aapt",
+ aapt2 = "//prebuilts/sdk/tools:linux/bin/aapt2",
adb = ":fail", # TODO: use system/core/adb ?
- aidl = "tools/linux/bin/aidl",
+ aidl = "//prebuilts/sdk/tools:linux/bin/aidl",
android_jar = "30/public/android.jar",
apksigner = ":apksigner",
- dx = "tools/linux/bin/dx", # TODO: add D8
+ dx = "//prebuilts/sdk/tools:linux/bin/dx", # TODO: add D8
framework_aidl = "30/public/framework.aidl",
- main_dex_classes = "tools/mainDexClasses.rules",
+ main_dex_classes = "//prebuilts/sdk/tools:mainDexClasses.rules",
main_dex_list_creator = ":fail",
proguard = ":fail", # TODO: add R8
shrinked_android_jar = "30/public/android.jar",
visibility = ["//visibility:public"],
- zipalign = "tools/linux/bin/zipalign",
+ zipalign = "//prebuilts/sdk/tools:linux/bin/zipalign",
)
java_import(
name = "dx_jar_import",
- jars = ["tools/linux/lib/dx.jar"],
+ jars = ["//prebuilts/sdk/tools:linux/lib/dx.jar"],
visibility = ["//visibility:public"],
)
java_binary(
name = "apksigner",
main_class = "com.android.apksigner.ApkSignerTool",
- runtime_deps = ["tools/linux/lib/apksigner.jar"],
+ runtime_deps = ["//prebuilts/sdk/tools:linux/lib/apksigner.jar"],
)
toolchain(
@@ -50,7 +48,7 @@
android_toolchain(
name = "android_default",
- aapt2 = "//prebuilts/sdk:tools/linux/bin/aapt2",
+ aapt2 = "//prebuilts/sdk/tools:linux/bin/aapt2",
adb = ":fail",
android_kit = ":fail",
apk_to_bundle_tool = ":fail",