aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings.gradle9
1 files changed, 5 insertions, 4 deletions
diff --git a/settings.gradle b/settings.gradle
index 9ab4a914693..584f6792517 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -37,15 +37,16 @@ if (extraSettings.exists()) {
apply from: extraSettings
}
-ext.isCiServer = System.getenv().containsKey("CI")
-ext.buildCacheHost = System.getenv().getOrDefault("CIRRUS_HTTP_CACHE_HOST", "localhost:12321")
+ext.isCiServer = System.getenv().containsKey("CIRRUS_CI")
+ext.isMasterBranch = System.getenv()["CIRRUS_BRANCH"] == "master"
+
buildCache {
local {
enabled = !isCiServer
}
remote(HttpBuildCache) {
- url = "http://" + buildCacheHost + "/"
+ url = 'http://' + System.getenv().getOrDefault("CIRRUS_HTTP_CACHE_HOST", "localhost:12321") + "/"
enabled = isCiServer
- push = true
+ push = isMasterBranch
}
}