From 5078b61550507165e5b973c8133531b7ad50e1d7 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Thu, 18 Jan 2024 11:14:01 -0500 Subject: [PATCH] Update to Gradle 8.5 Signed-off-by: Andriy Redko Signed-off-by: RS146BIJAY --- .github/workflows/build.yml | 2 ++ .github/workflows/release-workflow.yml | 2 +- build-tools/pkgbuild.gradle | 12 +++++------- build-tools/plugin-coverage.gradle | 6 +++--- build.gradle | 16 +++++++++------- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c26cda3..0480210d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: java: - 11 - 17 + - 21 # Job name name: Build Asynchronous Search # This job runs on Linux. @@ -69,6 +70,7 @@ jobs: java: - 11 - 17 + - 21 # Job name name: Test Asynchronous Search with opensearchstaging docker # This job runs on Linux. diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 848f345f..ae9d865a 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - java: [11,17] + java: [11,17,21] # Job name name: Build Asynchronous Search with JDK ${{ matrix.java }} # This job runs on Linux diff --git a/build-tools/pkgbuild.gradle b/build-tools/pkgbuild.gradle index 11f22fa5..957e4100 100644 --- a/build-tools/pkgbuild.gradle +++ b/build-tools/pkgbuild.gradle @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -apply plugin: 'nebula.ospackage' +apply plugin: 'com.netflix.nebula.ospackage' // This is afterEvaluate because the bundlePlugin ZIP task is updated afterEvaluate and changes the ZIP name to match the plugin name afterEvaluate { @@ -45,9 +45,8 @@ afterEvaluate { task renameRpm(type: Copy) { from("$buildDir/distributions") into("$buildDir/distributions") - include archiveName - rename archiveName, "${packageName}-${version}.rpm" - doLast { delete file("$buildDir/distributions/$archiveName") } + rename "$archiveFileName", "${packageName}-${archiveVersion}.rpm" + doLast { delete file("$buildDir/distributions/$archiveFileName") } } } buildDeb { @@ -57,9 +56,8 @@ afterEvaluate { task renameDeb(type: Copy) { from("$buildDir/distributions") into("$buildDir/distributions") - include archiveName - rename archiveName, "${packageName}-${version}.deb" - doLast { delete file("$buildDir/distributions/$archiveName") } + rename "$archiveFileName", "${packageName}-${archiveVersion}.deb" + doLast { delete file("$buildDir/distributions/$archiveFileName") } } } } diff --git a/build-tools/plugin-coverage.gradle b/build-tools/plugin-coverage.gradle index a7ec20fa..20d59c2c 100644 --- a/build-tools/plugin-coverage.gradle +++ b/build-tools/plugin-coverage.gradle @@ -62,9 +62,9 @@ jacocoTestReport { sourceDirectories.from = "src/main/java" classDirectories.from = sourceSets.main.output reports { - html.enabled = true // human readable - csv.enabled = true - xml.enabled = true // for coverlay + html.required = true // human readable + csv.required = true + xml.required = true // for coverlay } } diff --git a/build.gradle b/build.gradle index 1103b6fd..750e8e12 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { opensearch_group = "org.opensearch" isSnapshot = "true" == System.getProperty("build.snapshot", "true") opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") - opensearch_plugin_version = System.getProperty("bwc.version", "2.11.0.0") + opensearch_plugin_version = System.getProperty("bwc.version", "2.11.1.0") buildVersionQualifier = System.getProperty("build.version_qualifier", "") // 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT version_tokens = opensearch_version.tokenize('-') @@ -34,7 +34,7 @@ buildscript { dependencies { classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}" - classpath "org.jacoco:org.jacoco.agent:0.8.5" + classpath "org.jacoco:org.jacoco.agent:0.8.11" } } //****************************************************************************/ @@ -42,7 +42,7 @@ buildscript { //****************************************************************************/ plugins { - id 'nebula.ospackage' version "8.3.0" + id 'com.netflix.nebula.ospackage' version "11.6.0" id 'checkstyle' } @@ -81,8 +81,10 @@ ext { noticeFile = rootProject.file('NOTICE.txt') } -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} allprojects { group 'org.opensearch' @@ -134,7 +136,7 @@ dependencies { implementation "org.opensearch:common-utils:${common_utils_version}" configurations.all { resolutionStrategy { - force "com.google.guava:guava:32.0.1-jre" + force "com.google.guava:guava:32.1.1-jre" force "com.puppycrawl.tools:checkstyle:${project.checkstyle.toolVersion}" } } @@ -259,7 +261,7 @@ ext.getPluginResource = { download_to_folder, download_from_src -> } String baseName = "asynSearchCluster" -String bwcVersionShort = "2.11.0" +String bwcVersionShort = "2.11.1" String bwcVersion = bwcVersionShort + ".0" String bwcFilePath = "src/test/resources/org/opensearch/search/asynchronous/bwc/" String bwcRemoteFile = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/"+ bwcVersionShort + "/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-asynchronous-search-"+ bwcVersion +".zip"