Skip to content

Commit

Permalink
Update gradle config for develocity rebranding (opensearch-project#13942
Browse files Browse the repository at this point in the history
)

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>
  • Loading branch information
andrross authored and wangdongyu.danny committed Aug 22, 2024
1 parent cbf0b45 commit 525e641
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ plugins {
id 'opensearch.docker-support'
id 'opensearch.global-build-info'
id "com.diffplug.spotless" version "6.25.0" apply false
id "org.gradle.test-retry" version "1.5.9" apply false
id "test-report-aggregation"
id 'jacoco-report-aggregation'
}
Expand All @@ -71,6 +70,13 @@ apply from: 'gradle/run.gradle'
apply from: 'gradle/missing-javadoc.gradle'
apply from: 'gradle/code-coverage.gradle'

// Disable unconditional publishing of build scans
develocity {
buildScan {
publishing.onlyIf { false }
}
}

// common maven publishing configuration
allprojects {
group = 'org.opensearch'
Expand Down Expand Up @@ -462,9 +468,8 @@ gradle.projectsEvaluated {

// test retry configuration
subprojects {
apply plugin: "org.gradle.test-retry"
tasks.withType(Test).configureEach {
retry {
develocity.testRetry {
if (BuildParams.isCi()) {
maxRetries = 3
maxFailures = 10
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \
options.forkOptions.memoryMaximumSize=3g

# Disable Gradle Enterprise Gradle plugin's test retry
systemProp.gradle.enterprise.testretry.enabled=false
systemProp.develocity.testretry.enabled.enabled=false

# Disable duplicate project id detection
# See https://docs.gradle.org/current/userguide/upgrading_version_6.html#duplicate_project_names_may_cause_publication_to_fail
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

plugins {
id "com.gradle.enterprise" version "3.17.4"
id "com.gradle.develocity" version "3.17.4"
}

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

0 comments on commit 525e641

Please sign in to comment.