Skip to content

Commit e1af72f

Browse files
authored
Upgrade Gradle, SonarQub, Jacoco, NoHttp Versions
- also fix some gradle deprecations.
1 parent a21066f commit e1af72f

File tree

7 files changed

+51
-32
lines changed

7 files changed

+51
-32
lines changed

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ plugins {
1919
id 'base'
2020
id 'project-report'
2121
id 'idea'
22-
id 'org.sonarqube' version '2.8'
22+
id 'org.sonarqube' version '4.3.0.3225'
2323
id 'org.ajoberstar.grgit' version '4.0.1' apply false
24-
id 'io.spring.nohttp' version '0.0.5.RELEASE'
24+
id 'io.spring.nohttp' version '0.0.11'
2525
id 'io.spring.dependency-management' version '1.0.10.RELEASE' apply false
2626
id 'com.jfrog.artifactory' version '4.18.2' apply false
2727
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
@@ -171,7 +171,7 @@ configure(javaProjects) { subproject ->
171171
eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature'
172172

173173
jacoco {
174-
toolVersion = '0.8.7'
174+
toolVersion = '0.8.10'
175175
}
176176

177177
// dependencies that are common across all java projects
@@ -214,25 +214,25 @@ configure(javaProjects) { subproject ->
214214
}
215215
useJUnitPlatform()
216216

217-
if (System.properties['sonar.host.url']) {
218-
finalizedBy jacocoTestReport
219-
}
220217
}
221218

222219
checkstyle {
223220
configDirectory.set(rootProject.file("src/checkstyle"))
224-
toolVersion = '9.0'
221+
toolVersion = '10.8.0'
225222
}
226223

227224
jacocoTestReport {
225+
onlyIf { System.properties['sonar.host.url'] }
226+
dependsOn test
228227
reports {
229-
xml.enabled true
230-
csv.enabled false
231-
html.enabled false
232-
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
228+
xml.required = true
229+
csv.required = false
230+
html.required = false
233231
}
234232
}
235233

234+
rootProject.tasks['sonarqube'].dependsOn jacocoTestReport
235+
236236
publishing {
237237
publications {
238238
mavenJava(MavenPublication) {
@@ -634,7 +634,7 @@ task distZip(type: Zip, dependsOn: [docsZip]) { //, schemaZip]) {
634634
into "${baseDir}"
635635
}
636636

637-
from(zipTree(docsZip.archivePath)) {
637+
from(zipTree(docsZip.archiveFile)) {
638638
into "${baseDir}/docs"
639639
}
640640

gradle/wrapper/gradle-wrapper.jar

3.47 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
3+
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
5+
networkTimeout=10000
6+
validateDistributionUrl=true
47
zipStoreBase=GRADLE_USER_HOME
58
zipStorePath=wrapper/dists
6-
distributionSha256Sum=e5444a57cda4a95f90b0c9446a9e1b47d3d7f69057765bfb54bd4f482542d548

gradlew

Lines changed: 22 additions & 8 deletions
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,10 @@ 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##*/}
87-
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"'
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
9087

9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
@@ -133,22 +130,29 @@ location of your Java installation."
133130
fi
134131
else
135132
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.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac
@@ -193,6 +197,10 @@ if "$cygwin" || "$msys" ; then
193197
done
194198
fi
195199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
196204
# Collect all arguments for the java command;
197205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198206
# shell script including quotes and variable substitutions, so put them in
@@ -205,6 +213,12 @@ set -- \
205213
org.gradle.wrapper.GradleWrapperMain \
206214
"$@"
207215

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

gradlew.bat

Lines changed: 9 additions & 6 deletions
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

spring-kafka/src/main/java/org/springframework/kafka/listener/ContainerGroup.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 the original author or authors.
2+
* Copyright 2021-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,7 +67,7 @@ public ContainerGroup(String name, List<MessageListenerContainer> containers) {
6767
* @param name the group name.
6868
* @param containers the containers.
6969
*/
70-
public ContainerGroup(String name, MessageListenerContainer...containers) {
70+
public ContainerGroup(String name, MessageListenerContainer... containers) {
7171
this.name = name;
7272
for (MessageListenerContainer container : containers) {
7373
this.containers.add(container);

spring-kafka/src/test/java/org/springframework/kafka/retrytopic/RetryTopicConfigurationProviderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2022 the original author or authors.
2+
* Copyright 2018-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -184,7 +184,7 @@ public void nonAnnotatedMethod() {
184184
@Target({ElementType.METHOD})
185185
@Retention(RetentionPolicy.RUNTIME)
186186
@RetryableTopic
187-
static @interface MetaAnnotatedRetryableTopic {
187+
@interface MetaAnnotatedRetryableTopic {
188188
@AliasFor(attribute = "concurrency", annotation = RetryableTopic.class)
189189
String parallelism() default "3";
190190
}

0 commit comments

Comments
 (0)