diff --git a/settings.gradle.kts b/settings.gradle.kts index 30c7882b..70fc722b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -44,7 +44,8 @@ buildCache { if (ciTeamCityBuild) { remote(gradleEnterprise.buildCache) { isEnabled = true - isPush = true + val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY") + isPush = !accessKey.isNullOrEmpty() server = System.getenv("GRADLE_CACHE_REMOTE_URL") } }