Skip to content

Instantly share code, notes, and snippets.

@jin jin/.bazelrc
Last active Feb 26, 2019

Embed
What would you like to do?
Android bazelrc configuration for remote execution and dynamic builds on GCP Remote Build Execution
# Requires Bazel built from HEAD (after https://github.com/bazelbuild/bazel/commit/b6f2ff19727c150cd745cff3d6365eb40935253e)
# ... import /path/to/bazel-toolchains/bazelrc/bazel-0.19.2.bazelrc
## Configuration to build Android apps remotely
# bazel build //android:app --config=remote_android
build:remote_android --config=remote # Reuse remote config from RBE bazelrc
build:remote_android --strategy=CppCompile=remote # RBE C++ toolchain is built for RBE container
build:remote_android --strategy=CppLink=remote # RBE C++ toolchain is built for RBE container
build:remote_android --strategy=DexBuilder=remote # RBE C++ toolchain is built for RBE container
build:remote_android --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0
build:remote_android --noexperimental_check_desugar_deps # Workaround for singlejar incompatibility with RBE
# Configuration to build Android apps dynamically
# Requires host and remote to be Linux
build:dynamic_android --config=remote_android # load android_remote config
build:dynamic_android --experimental_spawn_scheduler # enable dynamic execution
build:dynamic_android --internal_persistent_busybox_tools # tell dynamic execution that resource processing supports workers
build:dynamic_android --strategy=DexBuilder=dynamic # force DexBuilder to use dynamic execution
build:dynamic_android --strategy=Javac=dynamic # force Javac to use dynamic executio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.