Skip to content

Commit 67a149c

Browse files
committed
Update to Gradle 9.1.0
Updates to Gradle version 9.1.0 and updates the Shadow plugin to version 9.2.2. Signed-off-by: onobc <chris.bono@gmail.com>
1 parent 6a35292 commit 67a149c

File tree

10 files changed

+43
-45
lines changed

10 files changed

+43
-45
lines changed

buildSrc/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ if (springVersion.contains("-")) {
1919
}
2020
}
2121

22-
sourceCompatibility = JavaVersion.VERSION_17
23-
targetCompatibility = JavaVersion.VERSION_17
24-
2522
sourceSets {
2623
main {
2724
java { srcDirs = [] }

buildSrc/src/main/groovy/spring-pulsar.integration-test-conventions.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
* the License.
1515
*/
1616

17+
sourceSets {
18+
intTest {
19+
compileClasspath += sourceSets.main.output + project.configurations.intTestCompileClasspath
20+
runtimeClasspath += sourceSets.main.output + project.configurations.intTestRuntimeClasspath
21+
}
22+
}
23+
1724
configurations {
1825
intTestImplementation {
1926
extendsFrom testImplementation
@@ -31,13 +38,6 @@ configurations {
3138
}
3239
}
3340

34-
sourceSets {
35-
intTest {
36-
compileClasspath += sourceSets.main.output + project.configurations.intTestCompileClasspath
37-
runtimeClasspath += sourceSets.main.output + project.configurations.intTestRuntimeClasspath
38-
}
39-
}
40-
4141
tasks.register('integrationTest', Test) {
4242
description = 'Runs integration tests.'
4343
group = 'verification'

gradle/build-libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ commons-compress = "1.26.2"
55
groovy = "2.5.17"
66
jackson = "2.19.1"
77
javaformat = "0.0.47"
8-
jfrog = "4.31.9"
8+
jfrog = "6.0.1"
99
maven = "3.6.3"
1010
nexus-publish = "1.3.0"
1111
nohttp = "0.0.11"

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ antora-yml = "0.0.1"
3333
download = "5.6.0"
3434
grgit = "5.2.2"
3535
nohttp = "0.0.11"
36-
shadow = "8.1.1"
36+
shadow = "9.2.2"
3737
versions = "0.52.0"
3838
version-catalog-update = "0.8.5"
3939
protobuf-plugin = "0.9.5"
@@ -75,7 +75,7 @@ antora = { id = "org.antora", version.ref = "antora" }
7575
antora-yml = { id = "io.spring.antora.generate-antora-yml", version.ref = "antora-yml" }
7676
download = { id = "de.undercouch.download", version.ref = "download" }
7777
grgit = { id = "org.ajoberstar.grgit", version.ref = "grgit" }
78-
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
78+
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
7979
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }
8080
spring-dep-mgmt = { id = "io.spring.dependency-management", version.ref = "spring-dep-mgmt" }
8181
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }

gradle/wrapper/gradle-wrapper.jar

302 Bytes
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.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
8890

8991
# Use the maximum available, or set MAX_FD != -1 to use that value.
9092
MAX_FD=maximum
@@ -112,7 +114,7 @@ case "$( uname )" in #(
112114
NONSTOP* ) nonstop=true ;;
113115
esac
114116

115-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
116118

117119

118120
# Determine the Java command to use to start the JVM.
@@ -203,15 +205,15 @@ fi
203205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204206

205207
# Collect all arguments for the java command:
206-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207209
# and any embedded shellness will be escaped.
208210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209211
# treated as '${Hostname}' itself on the command line.
210212

211213
set -- \
212214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
213215
-classpath "$CLASSPATH" \
214-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
215217
"$@"
216218

217219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
4345
%JAVA_EXE% -version >NUL 2>&1
4446
if %ERRORLEVEL% equ 0 goto execute
4547

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.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5153

5254
goto fail
5355

@@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5759

5860
if exist "%JAVA_EXE%" goto execute
5961

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.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6567

6668
goto fail
6769

6870
:execute
6971
@rem Setup the command line
7072

71-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7274

7375

7476
@rem Execute Gradle
75-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7678

7779
:end
7880
@rem End local scope for the variables with windows NT shell

spring-pulsar-cache-provider-caffeine/spring-pulsar-cache-provider-caffeine.gradle

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ jar {
1515
archiveClassifier.set('original')
1616
}
1717

18-
shadowJar {
19-
archiveClassifier.set(null)
20-
dependsOn(project.tasks.jar)
21-
manifest {
22-
inheritFrom project.tasks.jar.manifest
23-
}
18+
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
19+
archiveClassifier = ''
2420
from("${rootProject.projectDir}/src/dist") {
2521
include 'notice.txt'
2622
into 'META-INF'
@@ -33,22 +29,19 @@ shadowJar {
3329
relocate 'com.github.benmanes.caffeine', 'org.springframework.pulsar.shade.com.github.benmanes.caffeine'
3430
relocate 'com.google', 'org.springframework.pulsar.shade.com.google'
3531
dependencies {
36-
exclude(dependency {
32+
exclude {
3733
!['com.github.ben-manes.caffeine', 'com.google.errorprone'].contains(it.moduleGroup)
38-
})
34+
}
3935
}
4036
}
4137

42-
tasks.build.dependsOn tasks.shadowJar
43-
4438
// disable module metadata - otherwise original jar will be used when published
4539
tasks.withType(GenerateModuleMetadata) {
4640
enabled = false
4741
}
4842

49-
// delay the maven publishing - instead add shadowJar to the publication
50-
components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
51-
skip()
43+
shadow {
44+
addShadowVariantIntoJavaComponent = false
5245
}
5346

5447
publishing {

spring-pulsar-sample-apps/sample-pulsar-functions/sample-signup-function/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ plugins {
44

55
group = 'org.springframework.pulsar.sample'
66
description = 'Sample Signup Pulsar Function'
7-
sourceCompatibility = '1.8'
7+
8+
java {
9+
sourceCompatibility = JavaVersion.VERSION_1_8
10+
targetCompatibility = JavaVersion.VERSION_1_8
11+
}
812

913
repositories {
1014
mavenCentral()

0 commit comments

Comments
 (0)