Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Update Gradle to 8.5 #11420

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* text eol=lf
*.jar binary
*.bat binary
*.zip binary
*.exe binary
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ application {
}

base {
archivesBaseName = 'opensearch-benchmarks'
archivesName = 'opensearch-benchmarks'
}

test.enabled = false
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ allprojects {
} else {
// Link to non-shadowed dependant projects
project.javadoc.dependsOn "${upstreamProject.path}:javadoc"
String externalLinkName = upstreamProject.base.archivesBaseName
String externalLinkName = upstreamProject.base.archivesName
String artifactPath = dep.group.replaceAll('\\.', '/') + '/' + externalLinkName.replaceAll('\\.', '/') + '/' + dep.version
String projectRelativePath = project.relativePath(upstreamProject.buildDir)
project.javadoc.options.linksOffline artifactsHost + "/javadoc/" + artifactPath, "${projectRelativePath}/docs/javadoc/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
String name = extension1.name

BasePluginExtension base = project.getExtensions().findByType(BasePluginExtension.class)
base.archivesBaseName = name
base.archivesName = name

Check warning on line 92 in buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy

View check run for this annotation

Codecov / codecov/patch

buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy#L92

Added line #L92 was not covered by tests
project.description = extension1.description

if (extension1.name == null) {
Expand Down Expand Up @@ -155,15 +155,15 @@
// Only configure publishing if applied externally
if (extension.hasClientJar) {
project.pluginManager.apply('com.netflix.nebula.maven-base-publish')
// Only change Jar tasks, we don't want a -client zip so we can't change archivesBaseName
// Only change Jar tasks, we don't want a -client zip so we can't change archivesName
project.tasks.withType(Jar) {
archiveBaseName = archiveBaseName.get() + "-client"
}
// always configure publishing for client jars
project.publishing.publications.nebula(MavenPublication).artifactId(extension.name + "-client")
final BasePluginExtension base = project.getExtensions().findByType(BasePluginExtension.class)
project.tasks.withType(GenerateMavenPom.class).configureEach { GenerateMavenPom generatePOMTask ->
generatePOMTask.destination = "${project.buildDir}/distributions/${base.archivesBaseName}-client-${project.versions.opensearch}.pom"
generatePOMTask.destination = "${project.buildDir}/distributions/${base.archivesName}-client-${project.versions.opensearch}.pom"

Check warning on line 166 in buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy

View check run for this annotation

Codecov / codecov/patch

buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy#L166

Added line #L166 was not covered by tests
}
} else {
if (project.plugins.hasPlugin(MavenPublishPlugin)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}

private static String getArchivesBaseName(Project project) {
return project.getExtensions().getByType(BasePluginExtension.class).getArchivesBaseName();
return project.getExtensions().getByType(BasePluginExtension.class).getArchivesName().get();

Check warning on line 80 in buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java

View check run for this annotation

Codecov / codecov/patch

buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java#L80

Added line #L80 was not covered by tests
}

/**Configuration generation of maven poms. */
Expand Down
2 changes: 1 addition & 1 deletion client/benchmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ apply plugin: 'application'

base {
group = 'org.opensearch.client'
archivesBaseName = 'client-benchmarks'
archivesName = 'client-benchmarks'
}

// Not published so no need to assemble
Expand Down
2 changes: 1 addition & 1 deletion client/rest-high-level/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ apply plugin: 'opensearch.rest-resources'

base {
group = 'org.opensearch.client'
archivesBaseName = 'opensearch-rest-high-level-client'
archivesName = 'opensearch-rest-high-level-client'
}

restResources {
Expand Down
2 changes: 1 addition & 1 deletion client/rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ java {

base {
group = 'org.opensearch.client'
archivesBaseName = 'opensearch-rest-client'
archivesName = 'opensearch-rest-client'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion client/sniffer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ java {

base {
group = 'org.opensearch.client'
archivesBaseName = 'opensearch-rest-client-sniffer'
archivesName = 'opensearch-rest-client-sniffer'
}

dependencies {
Expand Down
15 changes: 15 additions & 0 deletions distribution/archives/darwin-arm64-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/darwin-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/freebsd-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
2 changes: 1 addition & 1 deletion distribution/archives/integ-test-zip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ apply plugin: 'com.netflix.nebula.maven-publish'

base {
group = "org.opensearch.distribution.integ-test-zip"
archivesBaseName = "opensearch"
archivesName = "opensearch"
}

integTest {
Expand Down
15 changes: 15 additions & 0 deletions distribution/archives/jre-linux-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/linux-arm64-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/linux-ppc64le-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/linux-s390x-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/linux-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/no-jdk-darwin-arm64-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/no-jdk-darwin-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/no-jdk-freebsd-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/no-jdk-linux-arm64-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/no-jdk-linux-ppc64le-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/no-jdk-linux-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/no-jdk-windows-zip/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/windows-zip/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/docker/docker-arm64-build-context/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
2 changes: 2 additions & 0 deletions distribution/docker/docker-arm64-export/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@

// This file is intentionally blank. All configuration of the
// export is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
2 changes: 2 additions & 0 deletions distribution/docker/docker-export/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@

// This file is intentionally blank. All configuration of the
// export is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
2 changes: 2 additions & 0 deletions distribution/docker/docker-ppc64le-export/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@

// This file is intentionally blank. All configuration of the
// export is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
Loading
Loading