diff --git a/build.gradle b/build.gradle index 760ae2e04ae..8247e300a2a 100644 --- a/build.gradle +++ b/build.gradle @@ -18,16 +18,14 @@ plugins { id "com.github.ben-manes.versions" version "0.24.0" } -if (System.getenv('GRADLE_ENTERPRISE_URL')) { - apply from: "$rootDir/gradle/build-scan-user-data.gradle" - buildScan { - captureTaskInputFiles = true - obfuscation { - ipAddresses { addresses -> addresses.collect { address -> '0.0.0.0'} } - } - publishAlways() - server = System.getenv('GRADLE_ENTERPRISE_URL') +apply from: "$rootDir/gradle/build-scan-user-data.gradle" +buildScan { + captureTaskInputFiles = true + obfuscation { + ipAddresses { addresses -> addresses.collect { address -> '0.0.0.0'} } } + publishAlwaysIf(System.getenv('GRADLE_ENTERPRISE_URL') != null) + server = 'https://ge.spring.io' } ext { diff --git a/gradle/build-cache-settings.gradle b/gradle/build-cache-settings.gradle index d62ea57ebd2..5684b4942b8 100644 --- a/gradle/build-cache-settings.gradle +++ b/gradle/build-cache-settings.gradle @@ -2,18 +2,16 @@ buildCache { local { enabled = true } - if (System.getenv('GRADLE_ENTERPRISE_URL')) { - remote(HttpBuildCache) { - enabled = true - url = "${System.getenv('GRADLE_ENTERPRISE_URL')}/cache/" - def cacheUsername = System.getenv('GRADLE_ENTERPRISE_CACHE_USERNAME') - def cachePassword = System.getenv('GRADLE_ENTERPRISE_CACHE_PASSWORD') - if (cacheUsername && cachePassword) { - push = true - credentials { - username = cacheUsername - password = cachePassword - } + remote(HttpBuildCache) { + enabled = true + url = 'https://ge.spring.io/cache/' + def cacheUsername = System.getenv('GRADLE_ENTERPRISE_CACHE_USERNAME') + def cachePassword = System.getenv('GRADLE_ENTERPRISE_CACHE_PASSWORD') + if (cacheUsername && cachePassword) { + push = true + credentials { + username = cacheUsername + password = cachePassword } } }