-
Notifications
You must be signed in to change notification settings - Fork 15
/
.bazelrc
120 lines (106 loc) · 4.91 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# BzlMod
common --enable_bzlmod=false
# Cache setup
common --disk_cache=bazel-cache
common --remote_cache_compression=true
common --remote_upload_local_results=false # Don't upload results by default
startup --digest_function=blake3
common --experimental_remote_cache_eviction_retries=10
common --modify_execution_info=JavaDeployJar=+no-remote-cache # Don't cache Java deploy jar which is huge in size
common --remote_cache_compression=true
common --experimental_disk_cache_gc_max_size=4G
# Error config
common --verbose_failures
# Env config
common --incompatible_strict_action_env
common --reuse_sandbox_directories
common --repo_env=RJE_VERBOSE=true
# JVM External rules
common --@rules_jvm_external//settings:stamp_manifest=False
# Resources
common --local_resources=cpu=HOST_CPUS*.75 # Android actions start their own threads which can overwhelm the system
# JAVA - START
common --experimental_strict_java_deps=off # Turn off strict java deps
common --java_runtime_version=remotejdk_17 # Use inbuilt Java 17 for hermeticity
common --tool_java_runtime_version=remotejdk_17
common --tool_java_language_version=17
common --java_language_version=17
## See https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Locale.html#legacy_language_codes
common --jvmopt="-Djava.locale.providers=COMPAT,SPI" # Use Java 8 default locale provider
common --jvmopt="--add-exports=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED"
common --experimental_java_classpath=bazel
common --experimental_java_header_input_pruning
# JAVA - END
# Android
common --experimental_google_legacy_api
common --noincompatible_enable_android_toolchain_resolution
common --noincompatible_enable_cc_toolchain_resolution
# D8 and Dexing flags
common --define=android_incremental_dexing_tool=d8_dexbuilder
common --define=android_standalone_dexing_tool=d8_compat_dx
common --define=android_dexmerger_tool=d8_dexmerger
# Resource Merging
common --experimental_disable_instrumentation_manifest_merge
common --features=android_resources_strict_deps
common --output_library_merged_assets=false # Turn off asset merging artifact
# common --android_non_transitive_r_class=true # Disable resource merging a.k.a non transitive R class
# common --experimental_use_package_aware_rtxt=true # Use package aware R.txt files (required for databinding)
# common --define=nontransitive_r_class=1 # Adapt bazel common rules for non transitive R class
# Workers
common --worker_verbose
common --worker_multiplex
common --experimental_shrink_worker_pool
common --experimental_worker_for_repo_fetching=platform
common --experimental_collect_worker_data_in_profiler
## Android Resource Workers
common --experimental_persistent_aar_extractor
common --persistent_android_dex_desugar
common --persistent_android_resource_processor
common --persistent_android_dex_desugar
common --persistent_multiplex_android_dex_desugar
common --persistent_multiplex_android_resource_processor
common --persistent_multiplex_android_tools
# Action Strategies
common --strategy=AARGenerator=worker
common --strategy=DatabindingStubs=worker
common --modify_execution_info=GenerateDataBindingBaseClasses=+supports-multiplex-workers=1
## Java Workers
common --strategy=KotlinCompile=worker
common --strategy=Javac=worker
# common --strategy=Turbine=worker
## Worker configuration to avoid CPU thrashing https://github.com/bazelbuild/bazel/issues/8586#issuecomment-500070549
common --worker_max_instances=Aapt2Optimize=1
common --worker_max_instances=AaptPackage=1
common --worker_max_instances=AndroidAapt2=1
common --worker_max_instances=AndroidAssetMerger=1
common --worker_max_instances=AndroidCompiledResourceMerger=1
common --worker_max_instances=AndroidResourceCompiler=1
common --worker_max_instances=AndroidResourceMerger=1
common --worker_max_instances=AndroidResourceParser=1
common --worker_max_instances=AndroidResourceValidator=1
common --worker_max_instances=AndroidLintAnalyze=1
common --worker_max_instances=AndroidLint=1
common --worker_max_instances=BuildConfigGenerationWorker=1
common --worker_max_instances=DatabindingStubs=1
common --worker_max_instances=DatabindingWorker=1
common --worker_max_instances=Desugar=1
common --worker_max_instances=DexBuilder=1
common --worker_max_instances=GenerateDataBindingBaseClasses=1
common --worker_max_instances=Javac=1
common --worker_max_instances=JdepsMerge=1
common --worker_max_instances=KotlinCompile=1
common --worker_max_instances=KotlinKapt=1
common --worker_max_instances=MergeSourceSets=1
common --worker_max_instances=ProcessDatabinding=1
common --worker_max_instances=RClassGenerator=1
common --worker_max_instances=Turbine=1
# Test config
test --build_tests_only
test --test_verbose_timeout_warnings
test --test_output=errors # Print test logs for failed tests
test --test_summary=terse # Print information only about unsuccessful tests that were run
run --ui_event_filters=-info,-stdout --noshow_progress
# Ci Config
common:ci --noshow_progress
common:ci --color=yes
try-import local.bazelrc