diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index f452c5cd463..b46004315b2 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -13,15 +13,9 @@ inputs: required: false default: false description: 'Whether to publish artifacts ready for deployment to Artifactory' - gradle-enterprise-secret-access-key: + develocity-access-key: required: false - description: 'The secret access key for authentication with ge.spring.io' - gradle-enterprise-cache-user: - required: false - description: 'The username for authentication with the remote build cache' - gradle-enterprise-cache-password: - required: false - description: 'The password for authentication with the remote build cache' + description: 'The access key for authentication with ge.spring.io' outputs: build-scan-url: description: 'The URL, if any, of the build scan produced by the build' @@ -42,20 +36,14 @@ runs: if: ${{ !inputs.publish }} shell: bash env: - GRADLE_ENTERPRISE_URL: 'https://ge.spring.io' - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ inputs.gradle-enterprise-secret-access-key }} - GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ inputs.gradle-enterprise-cache-user }} - GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ inputs.gradle-enterprise-cache-password }} + DEVELOCITY_ACCESS_KEY: ${{ inputs.develocity-access-key }} run: ./gradlew build - name: Build and Publish id: build-and-publish if: ${{ inputs.publish }} shell: bash env: - GRADLE_ENTERPRISE_URL: 'https://ge.spring.io' - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ inputs.gradle-enterprise-secret-access-key }} - GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ inputs.gradle-enterprise-cache-user }} - GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ inputs.gradle-enterprise-cache-password }} + DEVELOCITY_ACCESS_KEY: ${{ inputs.develocity-access-key }} run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository build publishAllPublicationsToDeploymentRepository - name: Read Version From gradle.properties id: read-version diff --git a/.github/workflows/build-and-deploy-snapshot.yml b/.github/workflows/build-and-deploy-snapshot.yml index e739a1a0331..8a17c9d3b39 100644 --- a/.github/workflows/build-and-deploy-snapshot.yml +++ b/.github/workflows/build-and-deploy-snapshot.yml @@ -19,9 +19,7 @@ jobs: id: build-and-publish uses: ./.github/actions/build with: - gradle-enterprise-secret-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - gradle-enterprise-cache-user: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} - gradle-enterprise-cache-password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} + develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} publish: true - name: Deploy uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed016a423ac..c8128e1b8af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,9 +44,7 @@ jobs: with: java-version: ${{ matrix.java.version }} java-toolchain: ${{ matrix.java.toolchain }} - gradle-enterprise-secret-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - gradle-enterprise-cache-user: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} - gradle-enterprise-cache-password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} + develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - name: Send Notification uses: ./.github/actions/send-notification if: always() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf4e9f0ad58..cc9319e259c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,9 +17,7 @@ jobs: id: build-and-publish uses: ./.github/actions/build with: - gradle-enterprise-cache-password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} - gradle-enterprise-cache-user: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} - gradle-enterprise-secret-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} + develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} publish: true - name: Stage Release uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index a98fe030b4d..c2d323e47bb 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -43,7 +43,7 @@ dependencies { implementation("com.diffplug.gradle:goomph:3.37.2") implementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}") implementation("com.github.node-gradle:gradle-node-plugin:3.5.1") - implementation("com.gradle:gradle-enterprise-gradle-plugin:3.12.1") + implementation("com.gradle:develocity-gradle-plugin:3.17.2") implementation("com.tngtech.archunit:archunit:1.0.0") implementation("commons-codec:commons-codec:${versions.commonsCodec}") implementation("de.undercouch.download:de.undercouch.download.gradle.plugin:5.5.0") diff --git a/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java index 9b30230ebe0..31294ecc619 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java @@ -24,8 +24,9 @@ import java.util.Set; import java.util.TreeMap; import java.util.stream.Collectors; -import com.gradle.enterprise.gradleplugin.testretry.TestRetryExtension; -import com.gradle.enterprise.gradleplugin.testselection.PredictiveTestSelectionExtension; +import com.gradle.develocity.agent.gradle.test.DevelocityTestConfiguration; +import com.gradle.develocity.agent.gradle.test.PredictiveTestSelectionConfiguration; +import com.gradle.develocity.agent.gradle.test.TestRetryConfiguration; import io.spring.javaformat.gradle.SpringJavaFormatPlugin; import io.spring.javaformat.gradle.tasks.CheckFormat; import io.spring.javaformat.gradle.tasks.Format; @@ -178,7 +179,9 @@ class JavaConventions { } private void configureTestRetries(Test test) { - TestRetryExtension testRetry = test.getExtensions().getByType(TestRetryExtension.class); + TestRetryConfiguration testRetry = test.getExtensions() + .getByType(DevelocityTestConfiguration.class) + .getTestRetry(); testRetry.getFailOnPassedAfterRetry().set(false); testRetry.getMaxRetries().set(isCi() ? 3 : 0); } @@ -189,8 +192,9 @@ class JavaConventions { private void configurePredictiveTestSelection(Test test) { if (isPredictiveTestSelectionEnabled()) { - PredictiveTestSelectionExtension predictiveTestSelection = test.getExtensions() - .getByType(PredictiveTestSelectionExtension.class); + PredictiveTestSelectionConfiguration predictiveTestSelection = test.getExtensions() + .getByType(DevelocityTestConfiguration.class) + .getPredictiveTestSelection(); predictiveTestSelection.getEnabled().convention(true); } } diff --git a/buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java b/buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java index 5d60470ee06..15dda0d9336 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java @@ -55,7 +55,7 @@ class ConventionsPluginTests { File settingsFile = new File(this.projectDir, "settings.gradle"); try (PrintWriter out = new PrintWriter(new FileWriter(settingsFile))) { out.println("plugins {"); - out.println(" id 'com.gradle.enterprise'"); + out.println(" id 'com.gradle.develocity'"); out.println("}"); out.println("include ':spring-boot-project:spring-boot-parent'"); } diff --git a/settings.gradle b/settings.gradle index f1c20b151c7..84d18c92ce3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -19,8 +19,8 @@ pluginManagement { } plugins { - id "com.gradle.enterprise" version "3.15.1" - id "io.spring.ge.conventions" version "0.0.16" + id "com.gradle.develocity" version "3.17.2" + id "io.spring.ge.conventions" version "0.0.17" } rootProject.name="spring-boot-build" @@ -28,7 +28,7 @@ rootProject.name="spring-boot-build" enableFeaturePreview("STABLE_CONFIGURATION_CACHE") settings.gradle.projectsLoaded { - gradleEnterprise { + develocity { buildScan { def toolchainVersion = settings.gradle.rootProject.findProperty('toolchainVersion') if (toolchainVersion != null) { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index 277ee3a325e..3b4e685872b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -207,8 +207,10 @@ def documentationTest = tasks.register("documentationTest", Test) { includeTestsMatching("org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation.*") } outputs.dir("${buildDir}/generated-snippets") - predictiveSelection { - enabled = false + develocity { + predictiveTestSelection { + enabled = false + } } } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-junit-vintage/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-junit-vintage/build.gradle index 537f554ab91..e5f7a615072 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-junit-vintage/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-junit-vintage/build.gradle @@ -21,9 +21,11 @@ test { throw new GradleException("No tests were executed") } } - } + } } - predictiveSelection { - enabled = false + develocity { + predictiveTestSelection { + enabled = false + } } }