| package(default_visibility = ["//visibility:public"]) |
| |
| alias( |
| name = "sdk", |
| actual = "//external:android/sdk", |
| ) |
| |
| android_library( |
| name = "incremental_stub_application", |
| deps = ["//src/tools/android/java/com/google/devtools/build/android/incrementaldeployment:incremental_stub_application"], |
| ) |
| |
| android_library( |
| name = "incremental_split_stub_application", |
| deps = ["//src/tools/android/java/com/google/devtools/build/android/incrementaldeployment:incremental_split_stub_application"], |
| ) |
| |
| alias( |
| name = "busybox", |
| actual = "//src/tools/android/java/com/google/devtools/build/android:ResourceProcessorBusyBox", |
| ) |
| |
| alias( |
| name = "merge_dexzips", |
| actual = "//src/tools/android/java/com/google/devtools/build/android/ziputils:reducer", |
| ) |
| |
| alias( |
| name = "shuffle_jars", |
| actual = "//src/tools/android/java/com/google/devtools/build/android/ziputils:mapper", |
| ) |
| |
| alias( |
| name = "dexbuilder", |
| actual = "//src/tools/android/java/com/google/devtools/build/android/dexer:DexBuilder", |
| ) |
| |
| alias( |
| name = "dexmerger", |
| actual = "//src/tools/android/java/com/google/devtools/build/android/dexer:DexFileMerger", |
| ) |
| |
| alias( |
| name = "desugar_java8", |
| actual = "//src/tools/android/java/com/google/devtools/build/android/desugar:Desugar", |
| ) |
| |
| # Bazel puts this on the bootclasspath of android_* targets to support Java 8 |
| # if requested. |
| filegroup( |
| name = "desugar_java8_extra_bootclasspath", |
| srcs = ["java_lang_extras.jar"], |
| visibility = ["//visibility:public"], |
| ) |
| |
| # javac needs this Jar to compile lambdas, method references, and type annotations. |
| # These classes are not part of the android.jar. |
| genrule( |
| name = "gen_java_lang_extras_jar", |
| srcs = [ |
| "@local_jdk//:bootclasspath" |
| ], |
| tools = [ |
| "@bazel_tools//tools/jdk:singlejar", |
| ], |
| outs = ["java_lang_extras.jar"], |
| cmd = """ |
| for jar in $(locations @local_jdk//:bootclasspath); do |
| if [[ "$${jar}" == *"/rt.jar" ]]; then |
| $(location @bazel_tools//tools/jdk:singlejar) \ |
| --exclude_build_data \ |
| --dont_change_compression \ |
| --sources $${jar} \ |
| --include_prefixes "java/lang/invoke/" \ |
| --include_prefixes "java/lang/annotation/" \ |
| --output $@ |
| break |
| fi |
| done |
| """, |
| visibility = ["//visibility:private"], |
| ) |
| |
| alias( |
| name = "IdlClass", |
| actual = "//src/tools/android/java/com/google/devtools/build/android/idlclass:IdlClass", |
| ) |
| |
| py_binary( |
| name = "merge_manifests", |
| srcs = [ |
| "android_permissions.py", |
| "merge_manifests.py", |
| ], |
| deps = [ |
| "//third_party/py/gflags", |
| ], |
| ) |
| |
| py_binary( |
| name = "build_incremental_dexmanifest", |
| srcs = [":build_incremental_dexmanifest.py"], |
| deps = [], |
| ) |
| |
| py_binary( |
| name = "build_split_manifest", |
| srcs = ["build_split_manifest.py"], |
| deps = [ |
| "//third_party/py/gflags", |
| ], |
| ) |
| |
| py_binary( |
| name = "incremental_install", |
| srcs = ["incremental_install.py"], |
| deps = [ |
| "//third_party/py/concurrent:futures", |
| "//third_party/py/gflags", |
| ], |
| ) |
| |
| py_binary( |
| name = "strip_resources", |
| srcs = ["strip_resources.py"], |
| deps = [ |
| "//third_party/py/gflags", |
| ], |
| ) |
| |
| py_binary( |
| name = "aar_native_libs_zip_creator", |
| srcs = [ |
| "aar_native_libs_zip_creator.py", |
| ], |
| deps = [ |
| "//third_party/py/gflags", |
| ], |
| ) |
| |
| py_binary( |
| name = "stubify_manifest", |
| srcs = ["stubify_manifest.py"], |
| deps = [ |
| "//third_party/py/gflags", |
| ], |
| ) |
| |
| sh_binary( |
| name = "rex_wrapper", |
| srcs = ["fail.sh"], |
| ) |
| |
| py_binary( |
| name = "aar_embedded_jars_extractor", |
| srcs = ["aar_embedded_jars_extractor.py"], |
| deps = ["//third_party/py/gflags"], |
| ) |
| |
| py_binary( |
| name = "aar_resources_extractor", |
| srcs = ["aar_resources_extractor.py"], |
| deps = ["//third_party/py/gflags"], |
| ) |
| |
| py_binary( |
| name = "resource_extractor", |
| srcs = ["resource_extractor.py"], |
| ) |
| |
| alias( |
| name = "android_runtest", |
| actual = "fail.sh", |
| ) |
| |
| alias( |
| name = "adb_static", |
| actual = "fail.sh", |
| ) |
| |
| alias( |
| name = "adb", |
| actual = "@androidsdk//:adb", |
| ) |
| |
| # If needed, this file can be regenerated by (validity is 30 * 365 days): |
| # keytool -genkeypair \ |
| # -alias androiddebugkey \ |
| # -dname "CN=Android Debug, O=Android, C=US" \ |
| # -keystore cica \ |
| # -sigalg SHA256withDSA \ |
| # -validity 10950 |
| filegroup( |
| name = "debug_keystore", |
| srcs = ["bazel_debug.keystore"], |
| ) |
| |
| alias( |
| name = "databinding_annotation_processor", |
| actual = "@android_databinding//:annotation_processor", |
| ) |
| |
| alias( |
| name = "jarjar_bin", |
| actual = "//third_party/java/jarjar:jarjar_bin", |
| ) |
| |
| # This is the default binding of //external:android/sdk. If someone attempts to |
| # build a rule that depends on //external:android/sdk without setting up |
| # android_sdk_repository in their WORKSPACE, the genrule will fail with a |
| # helpful error message. |
| android_sdk( |
| name = "poison_pill_android_sdk", |
| proguard = ":error_message", |
| aapt = ":error_message", |
| dx = ":error_message", |
| main_dex_list_creator = ":error_message", |
| adb = ":error_message", |
| framework_aidl = ":error_message", |
| aidl = ":error_message", |
| android_jar = ":error_message.jar", |
| shrinked_android_jar = ":error_message.jar", |
| annotations_jar = ":error_message.jar", |
| main_dex_classes = ":error_message", |
| apksigner = ":error_message", |
| zipalign = ":error_message", |
| resource_extractor = "error_message", |
| ) |
| |
| genrule( |
| name = "no_android_sdk_repository_error", |
| outs = ["error_message", "error_message.jar"], |
| cmd = """echo \ |
| This build requires an Android SDK. Please add the android_sdk_repository \ |
| rule to your WORKSPACE. ; \ |
| exit 1 """, |
| ) |
| |
| # //external:has_androidsdk is bound to either |
| # @bazel_tools//tools/android:always_true or |
| # @bazel_tools//tools/android:always_false depending on whether |
| # android_sdk_repository has run. This allows targets to depend on targets from |
| # @androidsdk if and only if the user has an android_sdk_repository set up. |
| |
| config_feature_flag( |
| name = "true", |
| default_value = "true", |
| allowed_values = ["true", "false"], |
| ) |
| |
| config_setting( |
| name = "always_true", |
| flag_values = { |
| ":true": "true" |
| }, |
| ) |
| |
| config_setting( |
| name = "always_false", |
| flag_values = { |
| ":true": "false", |
| }, |
| ) |