Skip to content

Commit 1c50c9d

Browse files
Update Gradle to 8.6 and fix some deprecation warnings in build script
1 parent e31d969 commit 1c50c9d

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ext {
2525
// on CI server, limit functional tests to major versions to avoid running
2626
// out of open file descriptors (happens when we load the jar files of too
2727
// many Gradle distributions into memory)
28-
if ("true".equals(System.getenv("CI"))) {
28+
if ("true" == System.getenv("CI")) {
2929
limitedVersionsToTest = [
3030
"5.6.4",
3131
"6.9.4",
@@ -74,11 +74,11 @@ jacocoTestReport {
7474
}
7575

7676
// configure functional tests
77-
task functionalTest
77+
tasks.register('functionalTest')
7878

7979
for (v in limitedVersionsToTest) {
8080
def vn = v.replace(".", "_")
81-
task "functionalTest_$vn"(type: Test) {
81+
tasks.register("functionalTest_$vn", Test) {
8282
include "**/FunctionalDownloadTest.class"
8383
systemProperty 'gradleVersionUnderTest', v
8484
}
@@ -87,7 +87,7 @@ for (v in limitedVersionsToTest) {
8787

8888
test.finalizedBy(functionalTest)
8989

90-
tasks.withType(Test).all {
90+
tasks.withType(Test).configureEach {
9191
// use junit5 for tests
9292
useJUnitPlatform()
9393

@@ -177,15 +177,15 @@ signing {
177177
useGpgCmd()
178178
}
179179

180-
tasks.withType(Sign) {
180+
tasks.withType(Sign).configureEach {
181181
onlyIf {
182182
// only sign release artifacts and not snapshots
183183
if (!isReleaseVersion) {
184184
return false
185185
}
186186

187187
// don't sign on CI server - it fails without a key
188-
if ("true".equals(System.getenv("CI"))) {
188+
if ("true" == System.getenv("CI")) {
189189
return false
190190
}
191191

gradle/wrapper/gradle-wrapper.jar

-19.8 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145145
case $MAX_FD in #(
146146
max*)
147147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
149149
MAX_FD=$( ulimit -H -n ) ||
150150
warn "Could not query maximum file descriptor limit"
151151
esac
152152
case $MAX_FD in #(
153153
'' | soft) :;; #(
154154
*)
155155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
157157
ulimit -n "$MAX_FD" ||
158158
warn "Could not set maximum file descriptor limit to $MAX_FD"
159159
esac
@@ -202,11 +202,11 @@ fi
202202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204204

205-
# Collect all arguments for the java command;
206-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207-
# shell script including quotes and variable substitutions, so put them in
208-
# double quotes to make sure that they get re-expanded; and
209-
# * put everything else in single quotes, so that it's not re-expanded.
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.
210210

211211
set -- \
212212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

0 commit comments

Comments
 (0)