diff --git a/settings.gradle b/settings.gradle index dd86e04e..cf4df606 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,7 +6,7 @@ plugins { gradleEnterprise { server = 'https://ge.grails.org' buildScan { - publishAlways() + publishAlwaysIf(System.getenv('CI') == 'true') publishIfAuthenticated() uploadInBackground = System.getenv("CI") == null capture { @@ -15,4 +15,14 @@ gradleEnterprise { } } -rootProject.name = "database-migration" \ No newline at end of file +buildCache { + local { enabled = System.getenv('CI') != 'true' } + remote(gradleEnterprise.buildCache) { + def isAuthenticated = System.getenv('GRADLE_ENTERPRISE_ACCESS_KEY') + push = System.getenv('CI') == 'true' && isAuthenticated + enabled = true + } +} + + +rootProject.name = "database-migration"