diff options
author | Brad Corso <bcorso@google.com> | 2023-12-06 14:40:43 -0800 |
---|---|---|
committer | Dagger Team <dagger-dev+copybara@google.com> | 2023-12-06 14:43:20 -0800 |
commit | eb9a034572a0749f0af5017369bd8d87b65500eb (patch) | |
tree | d1f926e506fb0ab6a97704ac0605fe4994c1ff30 | |
parent | 75d3cbcf95f1b540faac46f87bc8d018e254bd4e (diff) | |
download | dagger2-eb9a034572a0749f0af5017369bd8d87b65500eb.tar.gz |
Configure Bazel and Gradle to avoid spurious flakes.
This CL updates the global `bazelrc` file to enable `--incompatible_sandbox_hermetic_tmp` to avoid tmp file collision issues between actions.
This CL also updates the `gradle.properties` to give more memory to avoid Java Heap OOM issues.
RELNOTES=N/A
PiperOrigin-RevId: 588547788
9 files changed, 24 insertions, 5 deletions
diff --git a/javatests/artifacts/dagger-android-ksp/gradle.properties b/javatests/artifacts/dagger-android-ksp/gradle.properties index c344b594b..0bdf325d5 100644 --- a/javatests/artifacts/dagger-android-ksp/gradle.properties +++ b/javatests/artifacts/dagger-android-ksp/gradle.properties @@ -1,3 +1,4 @@ android.useAndroidX=true org.gradle.caching=true org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048m
\ No newline at end of file diff --git a/javatests/artifacts/dagger-android/simple/gradle.properties b/javatests/artifacts/dagger-android/simple/gradle.properties index 6cde789f6..0bdf325d5 100644 --- a/javatests/artifacts/dagger-android/simple/gradle.properties +++ b/javatests/artifacts/dagger-android/simple/gradle.properties @@ -1,3 +1,4 @@ android.useAndroidX=true org.gradle.caching=true -org.gradle.parallel=true
\ No newline at end of file +org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048m
\ No newline at end of file diff --git a/javatests/artifacts/dagger-ksp/gradle.properties b/javatests/artifacts/dagger-ksp/gradle.properties index e68633cff..a516e458c 100644 --- a/javatests/artifacts/dagger-ksp/gradle.properties +++ b/javatests/artifacts/dagger-ksp/gradle.properties @@ -1,2 +1,3 @@ org.gradle.caching=true -org.gradle.parallel=true
\ No newline at end of file +org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048m
\ No newline at end of file diff --git a/javatests/artifacts/dagger/gradle.properties b/javatests/artifacts/dagger/gradle.properties index e68633cff..a516e458c 100644 --- a/javatests/artifacts/dagger/gradle.properties +++ b/javatests/artifacts/dagger/gradle.properties @@ -1,2 +1,3 @@ org.gradle.caching=true -org.gradle.parallel=true
\ No newline at end of file +org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048m
\ No newline at end of file diff --git a/javatests/artifacts/hilt-android/pluginMarker/gradle.properties b/javatests/artifacts/hilt-android/pluginMarker/gradle.properties index 6cde789f6..0bdf325d5 100644 --- a/javatests/artifacts/hilt-android/pluginMarker/gradle.properties +++ b/javatests/artifacts/hilt-android/pluginMarker/gradle.properties @@ -1,3 +1,4 @@ android.useAndroidX=true org.gradle.caching=true -org.gradle.parallel=true
\ No newline at end of file +org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048m
\ No newline at end of file diff --git a/javatests/artifacts/hilt-android/simple/gradle.properties b/javatests/artifacts/hilt-android/simple/gradle.properties index b88e839aa..1efa70f69 100644 --- a/javatests/artifacts/hilt-android/simple/gradle.properties +++ b/javatests/artifacts/hilt-android/simple/gradle.properties @@ -9,3 +9,4 @@ org.gradle.unsafe.configuration-cache-problems=fail org.gradle.unsafe.configuration-cache.max-problems=0 org.gradle.caching=true org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048m
\ No newline at end of file diff --git a/javatests/artifacts/hilt-android/simpleKotlin/gradle.properties b/javatests/artifacts/hilt-android/simpleKotlin/gradle.properties index b88e839aa..1efa70f69 100644 --- a/javatests/artifacts/hilt-android/simpleKotlin/gradle.properties +++ b/javatests/artifacts/hilt-android/simpleKotlin/gradle.properties @@ -9,3 +9,4 @@ org.gradle.unsafe.configuration-cache-problems=fail org.gradle.unsafe.configuration-cache.max-problems=0 org.gradle.caching=true org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048m
\ No newline at end of file diff --git a/javatests/artifacts/hilt-android/viewmodel/gradle.properties b/javatests/artifacts/hilt-android/viewmodel/gradle.properties index 8ba35263a..1efa70f69 100644 --- a/javatests/artifacts/hilt-android/viewmodel/gradle.properties +++ b/javatests/artifacts/hilt-android/viewmodel/gradle.properties @@ -8,4 +8,5 @@ android.enableJetifier=true org.gradle.unsafe.configuration-cache-problems=fail org.gradle.unsafe.configuration-cache.max-problems=0 org.gradle.caching=true -org.gradle.parallel=true
\ No newline at end of file +org.gradle.parallel=true +org.gradle.jvmargs=-Xmx2048m
\ No newline at end of file diff --git a/tools/bazel.rc b/tools/bazel.rc new file mode 100644 index 000000000..2707c1c3a --- /dev/null +++ b/tools/bazel.rc @@ -0,0 +1,11 @@ +# Global bazelrc file (see https://bazel.build/run/bazelrc#global-bazelrc) + +# Note: This flag is required to prevent actions from clashing with each when +# reading/writing tmp files. Without this flag we get errors like: +# +# Error: Cannot use file /tmp/hsperfdata_runner/12 because it is locked by +# another process +# +# This flag will be enabled by default in Bazel 7.0.0, but for now we enable it +# manually. For more details: https://github.com/bazelbuild/bazel/issues/3236. +build --incompatible_sandbox_hermetic_tmp
\ No newline at end of file |