Created
March 4, 2021 04:37
-
-
Save FareesHussain/f4d5f0297e314807e60c593500b25890 to your computer and use it in GitHub Desktop.
example app BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@rules_android//android:rules.bzl", "android_binary", "android_library") | |
# The final binary rule, which builds the APK and sets the application manifest, | |
# as well as any other resources needed by the application. | |
# The package for the R class for resources is normally inferred from the | |
# directory containing the BUILD file, but this BUILD file is not under a java | |
# directory, so we specify it manually. | |
android_binary( | |
name = "android", | |
custom_package = "com.google.bazel.example.android", | |
manifest = "src/main/java/com/google/bazel/example/android/AndroidManifest.xml", | |
resource_files = glob(["src/main/java/com/google/bazel/example/android/res/**"]), | |
visibility = ["//visibility:public"], | |
deps = [":activities"], | |
) | |
# A library which compiles some Java sources and associated resources. | |
# Because it has resources, it requires a manifest. | |
android_library( | |
name = "activities", | |
srcs = glob(["src/main/java/com/google/bazel/example/android/activities/*.java"]), | |
custom_package = "com.google.bazel.example.android.activities", | |
manifest = "src/main/java/com/google/bazel/example/android/activities/AndroidManifest.xml", | |
resource_files = glob(["src/main/java/com/google/bazel/example/android/activities/res/**"]), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment