diff --git a/gradle/build-scans.gradle b/gradle/build-scans.gradle deleted file mode 100644 index b134b6f142..0000000000 --- a/gradle/build-scans.gradle +++ /dev/null @@ -1,40 +0,0 @@ -File acceptFile = new File(gradle.gradleUserHomeDir, "build-scans/spotless/gradle-scans-license-agree.txt") -acceptFile.parentFile.mkdirs() -def env = System.getenv() -boolean isCI = env.CI || env.TRAVIS -boolean hasAccepted = isCI || env.SPOTLESS_GRADLE_SCANS_ACCEPT=='yes' || acceptFile.exists() && acceptFile.text.trim() == 'yes' -boolean hasRefused = env.SPOTLESS_GRADLE_SCANS_ACCEPT=='no' || acceptFile.exists() && acceptFile.text.trim() == 'no' - -buildScan { - if (hasAccepted) { - termsOfServiceAgree = 'yes' - } else if (!hasRefused) { - gradle.buildFinished { - println """ -This build uses Gradle Build Scans to gather statistics, share information about -failures, environmental issues, dependencies resolved during the build and more. -Build scans will be published after each build, if you accept the terms of -service, and in particular the privacy policy. - -Please read - - https://gradle.com/terms-of-service - https://gradle.com/legal/privacy - -and then: - - - set the `SPOTLESS_GRADLE_SCANS_ACCEPT` to `yes`/`no` if you agree with/refuse the TOS - - or create the ${acceptFile} file with `yes`/`no` in it if you agree with/refuse - - echo 'yes' >> ${acceptFile} - - or - - echo 'no' >> ${acceptFile} - -And we'll not bother you again. Note that build scans are only made public if -you share the URL at the end of the build. -""" - } - } -} diff --git a/settings.gradle b/settings.gradle index 1126463326..29d208c029 100644 --- a/settings.gradle +++ b/settings.gradle @@ -19,8 +19,8 @@ plugins { id 'com.adarshr.test-logger' version '4.0.0' apply false // https://github.com/davidburstrom/version-compatibility-gradle-plugin/tags id 'io.github.davidburstrom.version-compatibility' version '0.5.0' apply false - // https://plugins.gradle.org/plugin/com.gradle.enterprise - id 'com.gradle.enterprise' version '3.16' + // https://plugins.gradle.org/plugin/com.gradle.develocity + id 'com.gradle.develocity' version '3.17' // https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md id 'dev.equo.ide' version '1.7.5' apply false } @@ -59,11 +59,15 @@ if (System.env['CI'] != null) { } } -gradleEnterprise { +def isCI = providers.environmentVariable('CI').present + +develocity { buildScan { - termsOfServiceUrl = "https://gradle.com/terms-of-service" - termsOfServiceAgree = "yes" - publishAlwaysIf(providers.environmentVariable('CI').present) + termsOfUseUrl = "https://gradle.com/terms-of-service" + termsOfUseAgree = "yes" + publishing { + onlyIf { isCI } + } } }