Allow using GE if locally authenticated
MODIFY
settings.gradle.kts
settings.gradle.kts
@@ -31,12 +31,14 @@ val isCI = System.getenv("CI") != null
val geAccessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY") ?: ""
// if GE access key is not given and we are in CI, then we publish to scans.gradle.com
+val useScansGradleCom = isCI && geAccessKey.isEmpty()
+
gradleEnterprise {
- if (geAccessKey.isNotEmpty()) {
+ if (!useScansGradleCom) {
server = gradleEnterpriseServer
}
buildScan {
- if (isCI && geAccessKey.isEmpty()) {
+ if (useScansGradleCom) {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}

Allow using GE if locally authenticated (#4742)