diff --git a/settings.gradle b/settings.gradle index 4d575e0c74..c5f646d96a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -33,9 +33,17 @@ if ( !JavaVersion.current().java11Compatible ) { buildCache { // duplicated from `gradle-enterprise.gradle` but not sure how to share it... def isCi = System.getenv("CI") != null || System.getProperty("CI") != null + def populateRemote = System.getenv("POPULATE_REMOTE") != null || System.getProperty("POPULATE_REMOTE") != null - local { enabled = !isCi } - remote(HttpBuildCache) { enabled = false } + local { + // do not use local build cache for CI jobs, period! + enabled = !isCi + } + remote(HttpBuildCache) { + enabled = true + push = populateRemote + url = 'https://ge.hibernate.org/cache/' + } } gradle.ext.baselineJavaVersion = JavaLanguageVersion.of( 11 )