Skip to content

Commit bc2b501

Browse files
RS146BIJAYreta
andauthored
Update to Gradle 8.5 (opensearch-project#519)
* Updating maintainers file Signed-off-by: RS146BIJAY <rishavsagar4b1@gmail.com> * Update to Gradle 8.5 Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: RS146BIJAY <rishavsagar4b1@gmail.com> --------- Signed-off-by: RS146BIJAY <rishavsagar4b1@gmail.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: Andriy Redko <andriy.redko@aiven.io>
1 parent e70aa78 commit bc2b501

File tree

10 files changed

+65
-45
lines changed

10 files changed

+65
-45
lines changed

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
java:
2222
- 11
2323
- 17
24+
- 21
2425
# Job name
2526
name: Build Asynchronous Search
2627
# This job runs on Linux.
@@ -69,6 +70,7 @@ jobs:
6970
java:
7071
- 11
7172
- 17
73+
- 21
7274
# Job name
7375
name: Test Asynchronous Search with opensearchstaging docker
7476
# This job runs on Linux.

.github/workflows/release-workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
build:
1414
strategy:
1515
matrix:
16-
java: [11,17]
16+
java: [11,17,21]
1717
# Job name
1818
name: Build Asynchronous Search with JDK ${{ matrix.java }}
1919
# This job runs on Linux

MAINTAINERS.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This document contains a list of maintainers in this repo. See [opensearch-proje
44

55
## Current Maintainers
66

7-
| Maintainer | GitHub ID | Affiliation |
8-
|-----------------|----------------------------------------------------------|-------------|
9-
| Bharathwaj G | [bharath-techie](https://github.com/bharath-techie) | Amazon |
10-
| Arpit Bandejiya | [Arpit-Bandejiya](https://github.com/Arpit-Bandejiya) | Amazon |
11-
| Dhrubajyoti Das | [dhruv16dhr](https://github.com/dhruv16dhr) | Amazon |
12-
| Pranit Kumar | [pranikum](https://github.com/pranikum) | Amazon |
13-
| Bukhtawar Khan | [Bukhtawar](https://github.com/Bukhtawar) | Amazon |
7+
| Maintainer | GitHub ID | Affiliation |
8+
|-----------------|-------------------------------------------------------|-------------|
9+
| Rishav Sagar | [RS146BIJAY](https://github.com/RS146BIJAY) | Amazon |
10+
| Bharathwaj G | [bharath-techie](https://github.com/bharath-techie) | Amazon |
11+
| Arpit Bandejiya | [Arpit-Bandejiya](https://github.com/Arpit-Bandejiya) | Amazon |
12+
| Pranit Kumar | [pranikum](https://github.com/pranikum) | Amazon |
13+
| Bukhtawar Khan | [Bukhtawar](https://github.com/Bukhtawar) | Amazon |
1414

1515
## Emeritus
1616

build-tools/pkgbuild.gradle

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
apply plugin: 'nebula.ospackage'
7+
apply plugin: 'com.netflix.nebula.ospackage'
88

99
// This is afterEvaluate because the bundlePlugin ZIP task is updated afterEvaluate and changes the ZIP name to match the plugin name
1010
afterEvaluate {
@@ -45,9 +45,8 @@ afterEvaluate {
4545
task renameRpm(type: Copy) {
4646
from("$buildDir/distributions")
4747
into("$buildDir/distributions")
48-
include archiveName
49-
rename archiveName, "${packageName}-${version}.rpm"
50-
doLast { delete file("$buildDir/distributions/$archiveName") }
48+
rename "$archiveFileName", "${packageName}-${archiveVersion}.rpm"
49+
doLast { delete file("$buildDir/distributions/$archiveFileName") }
5150
}
5251
}
5352
buildDeb {
@@ -57,9 +56,8 @@ afterEvaluate {
5756
task renameDeb(type: Copy) {
5857
from("$buildDir/distributions")
5958
into("$buildDir/distributions")
60-
include archiveName
61-
rename archiveName, "${packageName}-${version}.deb"
62-
doLast { delete file("$buildDir/distributions/$archiveName") }
59+
rename "$archiveFileName", "${packageName}-${archiveVersion}.deb"
60+
doLast { delete file("$buildDir/distributions/$archiveFileName") }
6361
}
6462
}
6563
}

build-tools/plugin-coverage.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ jacocoTestReport {
6262
sourceDirectories.from = "src/main/java"
6363
classDirectories.from = sourceSets.main.output
6464
reports {
65-
html.enabled = true // human readable
66-
csv.enabled = true
67-
xml.enabled = true // for coverlay
65+
html.required = true // human readable
66+
csv.required = true
67+
xml.required = true // for coverlay
6868
}
6969
}
7070

build.gradle

+10-8
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildscript {
1111
opensearch_group = "org.opensearch"
1212
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
1313
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT")
14-
opensearch_plugin_version = System.getProperty("bwc.version", "2.11.0.0")
14+
opensearch_plugin_version = System.getProperty("bwc.version", "2.12.0.0")
1515
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
1616
// 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT
1717
version_tokens = opensearch_version.tokenize('-')
@@ -34,15 +34,15 @@ buildscript {
3434

3535
dependencies {
3636
classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}"
37-
classpath "org.jacoco:org.jacoco.agent:0.8.5"
37+
classpath "org.jacoco:org.jacoco.agent:0.8.11"
3838
}
3939
}
4040
//****************************************************************************/
4141
// Build configurations
4242
//****************************************************************************/
4343

4444
plugins {
45-
id 'nebula.ospackage' version "8.3.0"
45+
id 'com.netflix.nebula.ospackage' version "11.6.0"
4646
id 'checkstyle'
4747
}
4848

@@ -81,8 +81,10 @@ ext {
8181
noticeFile = rootProject.file('NOTICE.txt')
8282
}
8383

84-
sourceCompatibility = JavaVersion.VERSION_11
85-
targetCompatibility = JavaVersion.VERSION_11
84+
java {
85+
sourceCompatibility = JavaVersion.VERSION_11
86+
targetCompatibility = JavaVersion.VERSION_11
87+
}
8688

8789
allprojects {
8890
group 'org.opensearch'
@@ -134,7 +136,7 @@ dependencies {
134136
implementation "org.opensearch:common-utils:${common_utils_version}"
135137
configurations.all {
136138
resolutionStrategy {
137-
force "com.google.guava:guava:32.0.1-jre"
139+
force "com.google.guava:guava:32.1.1-jre"
138140
force "com.puppycrawl.tools:checkstyle:${project.checkstyle.toolVersion}"
139141
}
140142
}
@@ -259,11 +261,11 @@ ext.getPluginResource = { download_to_folder, download_from_src ->
259261
}
260262

261263
String baseName = "asynSearchCluster"
262-
String bwcVersionShort = "2.11.0"
264+
String bwcVersionShort = "2.12.0"
263265
String bwcVersion = bwcVersionShort + ".0"
264266
String bwcFilePath = "src/test/resources/org/opensearch/search/asynchronous/bwc/"
265267
String bwcRemoteFile = "https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/"+ bwcVersionShort + "/latest/linux/x64/tar/builds/opensearch/plugins/opensearch-asynchronous-search-"+ bwcVersion +".zip"
266-
getPluginResource(bwcFilePath + bwcVersion, bwcRemoteFile)
268+
//getPluginResource(bwcFilePath + bwcVersion, bwcRemoteFile)
267269
// Creates two test clusters of previous version and loads opensearch plugin of bwcVersion
268270
2.times { i ->
269271
testClusters {
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

+27-12
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,12 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
8786

88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
87+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
88+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9089

9190
# Use the maximum available, or set MAX_FD != -1 to use that value.
9291
MAX_FD=maximum
@@ -133,22 +132,29 @@ location of your Java installation."
133132
fi
134133
else
135134
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
135+
if ! command -v java >/dev/null 2>&1
136+
then
137+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137138
138139
Please set the JAVA_HOME variable in your environment to match the
139140
location of your Java installation."
141+
fi
140142
fi
141143

142144
# Increase the maximum file descriptors if we can.
143145
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144146
case $MAX_FD in #(
145147
max*)
148+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
149+
# shellcheck disable=SC2039,SC3045
146150
MAX_FD=$( ulimit -H -n ) ||
147151
warn "Could not query maximum file descriptor limit"
148152
esac
149153
case $MAX_FD in #(
150154
'' | soft) :;; #(
151155
*)
156+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
157+
# shellcheck disable=SC2039,SC3045
152158
ulimit -n "$MAX_FD" ||
153159
warn "Could not set maximum file descriptor limit to $MAX_FD"
154160
esac
@@ -193,18 +199,27 @@ if "$cygwin" || "$msys" ; then
193199
done
194200
fi
195201

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
201210

202211
set -- \
203212
"-Dorg.gradle.appname=$APP_BASE_NAME" \
204213
-classpath "$CLASSPATH" \
205214
org.gradle.wrapper.GradleWrapperMain \
206215
"$@"
207216

217+
# Stop when "xargs" is not available.
218+
if ! command -v xargs >/dev/null 2>&1
219+
then
220+
die "xargs is not available"
221+
fi
222+
208223
# Use "xargs" to parse quoted args.
209224
#
210225
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

+9-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4041

4142
set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44+
if %ERRORLEVEL% equ 0 goto execute
4445

4546
echo.
4647
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7576

7677
:end
7778
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
if %ERRORLEVEL% equ 0 goto mainEnd
7980

8081
:fail
8182
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8283
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
84+
set EXIT_CODE=%ERRORLEVEL%
85+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
86+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87+
exit /b %EXIT_CODE%
8588

8689
:mainEnd
8790
if "%OS%"=="Windows_NT" endlocal

0 commit comments

Comments
 (0)