Browse Source

Apply the Cirrus guidelines about Gradle cache

tags/7.7
Simon Brandhof 5 years ago
parent
commit
bd12d0fa7b
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      settings.gradle

+ 5
- 4
settings.gradle View File

@@ -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
}
}

Loading…
Cancel
Save