Skip to content

Commit 715a8f7

Browse files
committed
Switch build to Java 25
Closes gh-1723
1 parent b26a507 commit 715a8f7

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inputs:
1919
java-version:
2020
description: 'Java version to compile and test with'
2121
required: false
22-
default: '17'
22+
default: '25'
2323
publish:
2424
description: 'Whether to publish artifacts ready for deployment to Artifactory'
2525
required: false

.github/actions/prepare-gradle-build/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inputs:
1919
java-version:
2020
description: 'Java version to use for the build'
2121
required: false
22-
default: '17'
22+
default: '25'
2323
runs:
2424
using: composite
2525
steps:
@@ -29,7 +29,7 @@ runs:
2929
distribution: ${{ inputs.java-early-access == 'true' && 'temurin' || (inputs.java-distribution || 'liberica') }}
3030
java-version: |
3131
${{ inputs.java-early-access == 'true' && format('{0}-ea', inputs.java-version) || inputs.java-version }}
32-
${{ inputs.java-toolchain == 'true' && '17' || '' }}
32+
${{ inputs.java-toolchain == 'true' && '25' || '' }}
3333
- name: Set Up Gradle
3434
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
3535
with:

.github/workflows/build-and-deploy-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: ./.github/actions/send-notification
4141
with:
4242
build-scan-url: ${{ steps.build-and-publish.outputs.build-scan-url }}
43-
run-name: ${{ format('{0} | Linux | Java 17', github.ref_name) }}
43+
run-name: ${{ format('{0} | Linux | Java 25', github.ref_name) }}
4444
status: ${{ job.status }}
4545
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
4646
outputs:

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ jobs:
2020
name: Linux
2121
java:
2222
- version: 17
23-
toolchain: false
23+
toolchain: true
2424
- version: 21
2525
toolchain: true
2626
- version: 25
27-
toolchain: true
27+
toolchain: false
2828
exclude:
2929
- os:
3030
name: Linux
3131
java:
32-
version: 17
32+
version: 25
3333
steps:
3434
- name: Prepare Windows runner
3535
if: ${{ runner.os == 'Windows' }}

.sdkmanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
3-
java=17.0.16-librca
3+
java=25-librca

README.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ We like to know the Spring Web Services version, operating system, and JVM versi
4848

4949
You don't need to build from source to use Spring Web Services (binaries in https://repo.spring.io[repo.spring.io]).
5050
If you want to try out the latest and greatest, Spring Web Services can be built and published to your local Maven cache using the https://docs.gradle.org/current/userguide/gradle_wrapper.html[Gradle wrapper].
51-
You also need JDK 17.
51+
You also need JDK 25.
52+
53+
NOTE: Java 25 is only required by the build process, you can use Java 17+ to use the project.
5254

5355
[source,shell]
5456
----

gradle/plugins/conventions-plugin/src/main/java/org/springframework/ws/gradle/conventions/JavaPluginConventions.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,14 @@ void apply(Project project) {
6161
private void configureJavaConventions(Project project) {
6262
project.getTasks().withType(JavaCompile.class, (compile) -> {
6363
compile.getOptions().setEncoding("UTF-8");
64+
compile.getOptions().getRelease().set(17);
6465
List<String> args = compile.getOptions().getCompilerArgs();
6566
if (!args.contains("-parameters")) {
6667
args.add("-parameters");
6768
}
68-
boolean buildWithJava17 = !project.hasProperty("toolchainVersion")
69-
&& JavaVersion.current() == JavaVersion.VERSION_17;
70-
if (buildWithJava17) {
71-
args.addAll(Arrays.asList("-Werror", "-Xlint:unchecked", "-Xlint:deprecation", "-Xlint:rawtypes",
72-
"-Xlint:varargs"));
73-
}
69+
args.addAll(Arrays.asList("-Werror", "-Xlint:unchecked", "-Xlint:deprecation", "-Xlint:rawtypes",
70+
"-Xlint:varargs"));
71+
7472
});
7573
project.getDependencies().add("compileOnly", "com.google.code.findbugs:jsr305");
7674
}

0 commit comments

Comments
 (0)