Skip to content

Commit de63ff1

Browse files
committed
GH-3731: Upgrade Gradle and configure Java/Kotlin toolchains
Fixes: #3731 * Upgrade Gradle wrapper from 8.9 to 8.12.1 * Configure Java toolchain to use Java 23 * Add Kotlin compiler options for test compilation * Simplify project inclusion in settings.gradle using directory scan Signed-off-by: Soby Chacko <[email protected]>
1 parent 7d5874d commit de63ff1

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ configure(javaProjects) { subproject ->
131131
apply from: "${rootProject.projectDir}/gradle/publish-maven.gradle"
132132

133133
java {
134+
toolchain {
135+
languageVersion = JavaLanguageVersion.of(23)
136+
}
134137
withJavadocJar()
135138
withSourcesJar()
136139
registerFeature('optional') {
@@ -148,6 +151,16 @@ configure(javaProjects) { subproject ->
148151
options.encoding = 'UTF-8'
149152
}
150153

154+
compileTestKotlin {
155+
kotlinOptions {
156+
jvmTarget = JavaVersion.VERSION_17
157+
}
158+
compilerOptions {
159+
allWarningsAsErrors = true
160+
}
161+
}
162+
163+
151164
eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature'
152165

153166
// dependencies that are common across all java projects

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ org.gradle.jvmargs=-Xmx1536M -Dfile.encoding=UTF-8
33
org.gradle.caching=true
44
org.gradle.parallel=true
55
kotlin.stdlib.default.dependency=false
6+
#kotlin.jvm.target.validation.mode = IGNORE

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
3+
distributionSha256Sum=8d97a97984f6cbd2b85fe4c60a743440a347544bf18818048e611f5288d46c94
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

settings.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ plugins {
1111

1212
rootProject.name = 'spring-kafka-dist'
1313

14-
include 'spring-kafka'
15-
include 'spring-kafka-bom'
16-
include 'spring-kafka-test'
17-
include 'spring-kafka-docs'
14+
rootDir.eachDir { dir ->
15+
if (dir.name.startsWith('spring-')) {
16+
include ":${dir.name}"
17+
}
18+
}

0 commit comments

Comments
 (0)