Skip to content

Commit 087e467

Browse files
committed
Merge branch '3.1.x' into 3.2.x
Closes gh-40527
2 parents f13e487 + 83f6922 commit 087e467

File tree

10 files changed

+30
-40
lines changed

10 files changed

+30
-40
lines changed

.github/actions/build/action.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@ inputs:
1313
required: false
1414
default: false
1515
description: 'Whether to publish artifacts ready for deployment to Artifactory'
16-
gradle-enterprise-secret-access-key:
16+
develocity-access-key:
1717
required: false
18-
description: 'The secret access key for authentication with ge.spring.io'
19-
gradle-enterprise-cache-user:
20-
required: false
21-
description: 'The username for authentication with the remote build cache'
22-
gradle-enterprise-cache-password:
23-
required: false
24-
description: 'The password for authentication with the remote build cache'
18+
description: 'The access key for authentication with ge.spring.io'
2519
outputs:
2620
build-scan-url:
2721
description: 'The URL, if any, of the build scan produced by the build'
@@ -42,20 +36,14 @@ runs:
4236
if: ${{ !inputs.publish }}
4337
shell: bash
4438
env:
45-
GRADLE_ENTERPRISE_URL: 'https://ge.spring.io'
46-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ inputs.gradle-enterprise-secret-access-key }}
47-
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ inputs.gradle-enterprise-cache-user }}
48-
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ inputs.gradle-enterprise-cache-password }}
39+
DEVELOCITY_ACCESS_KEY: ${{ inputs.develocity-access-key }}
4940
run: ./gradlew build
5041
- name: Build and Publish
5142
id: build-and-publish
5243
if: ${{ inputs.publish }}
5344
shell: bash
5445
env:
55-
GRADLE_ENTERPRISE_URL: 'https://ge.spring.io'
56-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ inputs.gradle-enterprise-secret-access-key }}
57-
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ inputs.gradle-enterprise-cache-user }}
58-
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ inputs.gradle-enterprise-cache-password }}
46+
DEVELOCITY_ACCESS_KEY: ${{ inputs.develocity-access-key }}
5947
run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository build publishAllPublicationsToDeploymentRepository
6048
- name: Read Version From gradle.properties
6149
id: read-version

.github/workflows/build-and-deploy-snapshot.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ jobs:
1717
id: build-and-publish
1818
uses: ./.github/actions/build
1919
with:
20-
gradle-enterprise-secret-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
21-
gradle-enterprise-cache-user: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
22-
gradle-enterprise-cache-password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
20+
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
2321
publish: true
2422
- name: Deploy
2523
uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ jobs:
4444
with:
4545
java-version: ${{ matrix.java.version }}
4646
java-toolchain: ${{ matrix.java.toolchain }}
47-
gradle-enterprise-secret-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
48-
gradle-enterprise-cache-user: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
49-
gradle-enterprise-cache-password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
47+
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
5048
- name: Send Notification
5149
uses: ./.github/actions/send-notification
5250
if: always()

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ jobs:
1717
id: build-and-publish
1818
uses: ./.github/actions/build
1919
with:
20-
gradle-enterprise-cache-password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
21-
gradle-enterprise-cache-user: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
22-
gradle-enterprise-secret-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
20+
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
2321
publish: true
2422
- name: Stage Release
2523
uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1

buildSrc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies {
4242
implementation(platform("org.springframework:spring-framework-bom:${versions.springFramework}"))
4343
implementation("com.diffplug.gradle:goomph:3.37.2")
4444
implementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")
45-
implementation("com.gradle:gradle-enterprise-gradle-plugin:3.12.1")
45+
implementation("com.gradle:develocity-gradle-plugin:3.17.2")
4646
implementation("com.tngtech.archunit:archunit:1.0.0")
4747
implementation("commons-codec:commons-codec:${versions.commonsCodec}")
4848
implementation("de.undercouch.download:de.undercouch.download.gradle.plugin:5.5.0")

buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@
2424
import java.util.TreeMap;
2525
import java.util.stream.Collectors;
2626

27-
import com.gradle.enterprise.gradleplugin.testretry.TestRetryExtension;
28-
import com.gradle.enterprise.gradleplugin.testselection.PredictiveTestSelectionExtension;
27+
import com.gradle.develocity.agent.gradle.test.DevelocityTestConfiguration;
28+
import com.gradle.develocity.agent.gradle.test.PredictiveTestSelectionConfiguration;
29+
import com.gradle.develocity.agent.gradle.test.TestRetryConfiguration;
2930
import io.spring.javaformat.gradle.SpringJavaFormatPlugin;
3031
import io.spring.javaformat.gradle.tasks.CheckFormat;
3132
import io.spring.javaformat.gradle.tasks.Format;
@@ -178,7 +179,9 @@ private void configureTestConventions(Project project) {
178179
}
179180

180181
private void configureTestRetries(Test test) {
181-
TestRetryExtension testRetry = test.getExtensions().getByType(TestRetryExtension.class);
182+
TestRetryConfiguration testRetry = test.getExtensions()
183+
.getByType(DevelocityTestConfiguration.class)
184+
.getTestRetry();
182185
testRetry.getFailOnPassedAfterRetry().set(false);
183186
testRetry.getMaxRetries().set(isCi() ? 3 : 0);
184187
}
@@ -189,8 +192,9 @@ private boolean isCi() {
189192

190193
private void configurePredictiveTestSelection(Test test) {
191194
if (isPredictiveTestSelectionEnabled()) {
192-
PredictiveTestSelectionExtension predictiveTestSelection = test.getExtensions()
193-
.getByType(PredictiveTestSelectionExtension.class);
195+
PredictiveTestSelectionConfiguration predictiveTestSelection = test.getExtensions()
196+
.getByType(DevelocityTestConfiguration.class)
197+
.getPredictiveTestSelection();
194198
predictiveTestSelection.getEnabled().convention(true);
195199
}
196200
}

buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void setup(@TempDir File projectDir) throws IOException {
5555
File settingsFile = new File(this.projectDir, "settings.gradle");
5656
try (PrintWriter out = new PrintWriter(new FileWriter(settingsFile))) {
5757
out.println("plugins {");
58-
out.println(" id 'com.gradle.enterprise'");
58+
out.println(" id 'com.gradle.develocity'");
5959
out.println("}");
6060
out.println("include ':spring-boot-project:spring-boot-parent'");
6161
}

settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ pluginManagement {
1919
}
2020

2121
plugins {
22-
id "com.gradle.enterprise" version "3.15.1"
23-
id "io.spring.ge.conventions" version "0.0.16"
22+
id "com.gradle.develocity" version "3.17.2"
23+
id "io.spring.ge.conventions" version "0.0.17"
2424
}
2525

2626
rootProject.name="spring-boot-build"
2727

2828
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
2929

3030
settings.gradle.projectsLoaded {
31-
gradleEnterprise {
31+
develocity {
3232
buildScan {
3333
def toolchainVersion = settings.gradle.rootProject.findProperty('toolchainVersion')
3434
if (toolchainVersion != null) {

spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,10 @@ def documentationTest = tasks.register("documentationTest", Test) {
240240
}
241241
jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED"
242242
outputs.dir("${buildDir}/generated-snippets")
243-
predictiveSelection {
244-
enabled = false
243+
develocity {
244+
predictiveTestSelection {
245+
enabled = false
246+
}
245247
}
246248
}
247249

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-junit-vintage/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ test {
2121
throw new GradleException("No tests were executed")
2222
}
2323
}
24-
}
24+
}
2525
}
26-
predictiveSelection {
27-
enabled = false
26+
develocity {
27+
predictiveTestSelection {
28+
enabled = false
29+
}
2830
}
2931
}

0 commit comments

Comments
 (0)