Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build-logic/aggregator/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
buildCache {
local {
directory = file("../../.gradle/build-cache")
// As in the root build: each checkout keeps its own cache, and CI keeps it in the Gradle user home.
if (!providers.environmentVariable("CI").isPresent) {
directory = file("../../.gradle/build-cache")
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion build-logic/common-plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
buildCache {
local {
directory = file("../../.gradle/build-cache")
// As in the root build: each checkout keeps its own cache, and CI keeps it in the Gradle user home.
if (!providers.environmentVariable("CI").isPresent) {
directory = file("../../.gradle/build-cache")
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion build-logic/settings-plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
buildCache {
local {
directory = file("../../.gradle/build-cache")
// As in the root build: each checkout keeps its own cache, and CI keeps it in the Gradle user home.
if (!providers.environmentVariable("CI").isPresent) {
directory = file("../../.gradle/build-cache")
}
}
}

Expand Down
7 changes: 6 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ buildCache {
// of this repository build concurrently (e.g., ../research-fork and ../gradle94).
// Without this, both projects share ~/.gradle/caches/build-cache-1/ and concurrent
// writes can corrupt cached artifacts (ZipFile invalid LOC header errors).
directory = file(".gradle/build-cache")
// CI builds one checkout at a time and keeps the cache in the Gradle user home, which
// setup-gradle saves after master's runs and restores for later runs, so that a run
// reuses what an earlier one built.
if (!providers.environmentVariable("CI").isPresent) {
directory = file(".gradle/build-cache")
}
}
}

Expand Down
Loading