Skip to content

Commit

Permalink
Update Gradle to 8.5 (opensearch-project#11136)
Browse files Browse the repository at this point in the history
* Update Gradle to 8.5

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Revert "remove unnecessary empty `build.gradle` files (opensearch-project#4723)"

This reverts commit a6b984b.

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

---------

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta authored and fahadshamiinsta committed Dec 4, 2023
1 parent 711af21 commit 1036585
Show file tree
Hide file tree
Showing 52 changed files with 464 additions and 20 deletions.
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 @@ -375,7 +375,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 @@ class PluginBuildPlugin implements Plugin<Project> {
String name = extension1.name

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

if (extension1.name == null) {
Expand Down Expand Up @@ -155,15 +155,15 @@ class PluginBuildPlugin implements Plugin<Project> {
// 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"
}
} else {
if (project.plugins.hasPlugin(MavenPublishPlugin)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void apply(Project project) {
}

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

/**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

0 comments on commit 1036585

Please sign in to comment.