blob: 74427f34571a8117b05a735085e93a5e1c826084 [file] [log] [blame]
David Ostrovsky28fe85f2023-11-18 22:13:31 +01001# TODO(davido): Migrate all dependencies from WORKSPACE to MODULE.bazel
2# https://issues.gerritcodereview.com/issues/303819949
3common --noenable_bzlmod
David Ostrovsky231e6982024-05-28 19:49:03 +02004common --incompatible_enable_proto_toolchain_resolution
David Ostrovsky28fe85f2023-11-18 22:13:31 +01005
David Ostrovsky2b5fe092021-03-03 11:52:30 +01006build --workspace_status_command="python3 ./tools/workspace_status.py"
David Ostrovsky2bf355d2018-05-30 08:58:22 +02007build --repository_cache=~/.gerritcodereview/bazel-cache/repository
Wyatt Allen370962b2018-06-08 15:45:02 -07008build --action_env=PATH
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +02009build --disk_cache=~/.gerritcodereview/bazel-cache/cas
David Ostrovsky21a891c2020-12-19 12:57:06 +010010
David Ostrovskyc47854e2023-11-25 13:27:00 +010011# Define configuration using remotejdk_17, executes using remotejdk_17 or local_jdk
12build:build_shared --java_language_version=17
13build:build_shared --java_runtime_version=remotejdk_17
14build:build_shared --tool_java_language_version=17
15build:build_shared --tool_java_runtime_version=remotejdk_17
David Ostrovsky21a891c2020-12-19 12:57:06 +010016
17# Builds using remotejdk_17, executes using remotejdk_17 or local_jdk
David Ostrovskyc47854e2023-11-25 13:27:00 +010018# Avoid warnings for non default configurations:
19# build --config=build_shared
David Ostrovsky02508332022-01-08 20:12:10 +010020build --java_language_version=17
21build --java_runtime_version=remotejdk_17
22build --tool_java_language_version=17
23build --tool_java_runtime_version=remotejdk_17
David Ostrovsky21a891c2020-12-19 12:57:06 +010024
Alvaro Vilaplana Garcia0491f5e2023-11-25 09:12:44 +000025# Builds and executes on Google GCP RBE using remotejdk_17
26build:remote --config=config_gcp
David Ostrovskyc47854e2023-11-25 13:27:00 +010027build:remote --config=build_shared
28
Alvaro Vilaplana Garcia0491f5e2023-11-25 09:12:44 +000029# Define remote configuration alias
30build:remote_gcp --config=remote
31
Alvaro Vilaplana Garciad0908c92023-11-15 15:59:25 +000032# Builds and executes on BuildBuddy RBE using remotejdk_17
33build:remote_bb --config=config_bb
34build:remote_bb --config=build_shared
35
David Ostrovskyc47854e2023-11-25 13:27:00 +010036# Builds using remotejdk_21, executes using remotejdk_21 or local_jdk
37build:build_java21_shared --java_language_version=21
38build:build_java21_shared --java_runtime_version=remotejdk_21
39build:build_java21_shared --tool_java_language_version=21
40build:build_java21_shared --tool_java_runtime_version=remotejdk_21
41
42build:java21 --config=build_java21_shared
43
44# Builds and executes on RBE using remotejdk_21
Alvaro Vilaplana Garcia0491f5e2023-11-25 09:12:44 +000045build:remote21 --config=config_gcp
David Ostrovskyc47854e2023-11-25 13:27:00 +010046build:remote21 --config=build_java21_shared
Han-Wen Nienhuys9c15e2b2019-05-16 16:59:33 +020047
Alvaro Vilaplana Garcia0491f5e2023-11-25 09:12:44 +000048# Define remote21 configuration alias
49build:remote21_gcp --config=remote21
50
Alvaro Vilaplana Garciad0908c92023-11-15 15:59:25 +000051# Builds and executes on BuildBuddy RBE using remotejdk_11
52build:remote21_bb --config=config_bb
53build:remote21_bb --config=build_java21_shared
54
Gert van Dijka5c54892019-09-19 11:57:16 +020055# Enable strict_action_env flag to. For more information on this feature see
56# https://groups.google.com/forum/#!topic/bazel-discuss/_VmRfMyyHBk.
57# This will be the new default behavior at some point (and the flag was flipped
58# shortly in 0.21.0 - https://github.com/bazelbuild/bazel/issues/7026). Remove
59# this flag here once flipped in Bazel again.
60build --incompatible_strict_action_env
61
David Ostrovsky2a3b2822021-02-19 12:58:35 +010062build --announce_rc
63
Thomas Draebing3ccc4cf2019-05-20 15:11:07 +020064test --build_tests_only
Nasser Grainawi84dbcef2023-02-22 15:59:32 -070065test --test_output=errors
Thomas Draebing3ccc4cf2019-05-20 15:11:07 +020066
David Ostrovskyadb2f752019-10-10 03:47:27 +020067import %workspace%/tools/remote-bazelrc
David Ostrovsky96d18ce2023-12-19 01:14:59 +010068
69# User-specific .bazelrc
70try-import %workspace%/user.bazelrc