aboutsummaryrefslogtreecommitdiff
path: root/common.bazelrc
diff options
context:
space:
mode:
authorRomain Jobredeaux <jobredeaux@google.com>2021-08-26 14:44:30 +0000
committerRomain Jobredeaux <jobredeaux@google.com>2021-08-27 13:58:44 +0000
commit9d3fe1c6778de72356298924118e1d703746dede (patch)
treeeee8a7a843c52f7b1b161fa53c953aaa16ee156c /common.bazelrc
parent3329236ccc54e00dd7f1e5e70e4c877f7ca88be0 (diff)
downloadbazel-9d3fe1c6778de72356298924118e1d703746dede.tar.gz
Add a java binary, a java library, and an android app target building to bp2build ci.
(Second attempt at https://android-review.googlesource.com/c/platform/build/bazel/+/1788469) Adding the --fat_apk_cpu=k8 flag to common.bazelrc as it only applies to android app building rules, and it is currently required to successfully build them. Forcing the use of the checked in Java JDK to avoid falling back to the local machine's JDK. This may be overkill, but I wrote a small doc to justify the new approach of setting JAVA_HOME in bazel.sh: go/aosp-bazel-jdk Test: b build examples/java/...; b build examples/android_app/...; lunch; b build examples/java/...; b build examples/android_app/... Change-Id: I9ce3886a3e6f1eec903de52493251ec3c5fa7681
Diffstat (limited to 'common.bazelrc')
-rw-r--r--common.bazelrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/common.bazelrc b/common.bazelrc
index fad3990e..4f21317b 100644
--- a/common.bazelrc
+++ b/common.bazelrc
@@ -8,6 +8,7 @@ build --incompatible_enable_cc_toolchain_resolution
# Ensure that the host_javabase always use @local_jdk, the checked-in JDK.
build --tool_java_runtime_version=local_jdk
+build --java_runtime_version=local_jdk
# Lock down the PATH variable in actions to /usr/bin and /usr/local/bin.
build --experimental_strict_action_env
@@ -72,6 +73,7 @@ build --experimental_android_databinding_v2
build --define=android_incremental_dexing_tool=d8_dexbuilder
build --define=android_dexmerger_tool=d8_dexmerger
build --nouse_workers_with_dexbuilder
+build --fat_apk_cpu=k8
# Developer instance for result storage. This only works if you have access
# to the Bazel GCP project. Follow the GCP gcloud client's auth instructions to