Skip to content

Commit e3d7e99

Browse files
authored
Update gradle config for develocity rebranding (opensearch-project#13942)
The Gradle Enterprise plugin has been rebranded as the Develocity Plugin, resulting in a number of settings being deprecated. This commit updates the settings per [this migration guide][1] and removes all warnings from the build. [1]: https://docs.gradle.com/develocity/gradle-plugin/legacy/#develocity_migration Signed-off-by: Andrew Ross <andrross@amazon.com>
1 parent bb013da commit e3d7e99

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

build.gradle

+8-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ plugins {
5555
id 'opensearch.docker-support'
5656
id 'opensearch.global-build-info'
5757
id "com.diffplug.spotless" version "6.25.0" apply false
58-
id "org.gradle.test-retry" version "1.5.9" apply false
5958
id "test-report-aggregation"
6059
id 'jacoco-report-aggregation'
6160
}
@@ -71,6 +70,13 @@ apply from: 'gradle/run.gradle'
7170
apply from: 'gradle/missing-javadoc.gradle'
7271
apply from: 'gradle/code-coverage.gradle'
7372

73+
// Disable unconditional publishing of build scans
74+
develocity {
75+
buildScan {
76+
publishing.onlyIf { false }
77+
}
78+
}
79+
7480
// common maven publishing configuration
7581
allprojects {
7682
group = 'org.opensearch'
@@ -462,9 +468,8 @@ gradle.projectsEvaluated {
462468

463469
// test retry configuration
464470
subprojects {
465-
apply plugin: "org.gradle.test-retry"
466471
tasks.withType(Test).configureEach {
467-
retry {
472+
develocity.testRetry {
468473
if (BuildParams.isCi()) {
469474
maxRetries = 3
470475
maxFailures = 10

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \
2222
options.forkOptions.memoryMaximumSize=3g
2323

2424
# Disable Gradle Enterprise Gradle plugin's test retry
25-
systemProp.gradle.enterprise.testretry.enabled=false
25+
systemProp.develocity.testretry.enabled.enabled=false
2626

2727
# Disable duplicate project id detection
2828
# See https://docs.gradle.org/current/userguide/upgrading_version_6.html#duplicate_project_names_may_cause_publication_to_fail

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
plugins {
13-
id "com.gradle.enterprise" version "3.17.4"
13+
id "com.gradle.develocity" version "3.17.4"
1414
}
1515

1616
ext.disableBuildCache = hasProperty('DISABLE_BUILD_CACHE') || System.getenv().containsKey('DISABLE_BUILD_CACHE')

0 commit comments

Comments
 (0)