Skip to content

Commit 5df2cd4

Browse files
committed
Upgrade to Java 17
Closes spring-projectsgh-832
1 parent 4cd9a34 commit 5df2cd4

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

README.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ In the instructions below, https://vimeo.com/34436402[`./gradlew`] is invoked fr
5252
a cross-platform, self-contained bootstrap mechanism for the build.
5353

5454
=== Prerequisites
55-
https://help.github.com/set-up-git-redirect[Git] and the https://www.oracle.com/technetwork/java/javase/downloads[JDK8 build].
55+
https://help.github.com/set-up-git-redirect[Git] and the https://www.oracle.com/technetwork/java/javase/downloads[JDK17 build].
5656

57-
Be sure that your `JAVA_HOME` environment variable points to the `jdk1.8.0` folder extracted from the JDK download.
57+
Be sure that your `JAVA_HOME` environment variable points to the `jdk17` folder extracted from the JDK download.
5858

5959
=== Check out sources
6060
[indent=0]

buildSrc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id "groovy"
55
}
66

7-
sourceCompatibility = JavaVersion.VERSION_1_8
7+
sourceCompatibility = JavaVersion.VERSION_17
88

99
repositories {
1010
gradlePluginPortal()

buildSrc/src/main/java/org/springframework/gradle/SpringJavaPlugin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ public void apply(Project project) {
7373

7474
// Apply Java source compatibility version
7575
JavaPluginExtension java = project.getExtensions().getByType(JavaPluginExtension.class);
76-
java.setTargetCompatibility(JavaVersion.VERSION_1_8);
76+
java.setTargetCompatibility(JavaVersion.VERSION_17);
7777

7878
// Configure Java tasks
7979
project.getTasks().withType(JavaCompile.class, (javaCompile) -> {
8080
CompileOptions options = javaCompile.getOptions();
8181
options.setEncoding("UTF-8");
8282
options.getCompilerArgs().add("-parameters");
8383
if (JavaVersion.current().isJava11Compatible()) {
84-
options.getRelease().set(8);
84+
options.getRelease().set(17);
8585
}
8686
});
8787
project.getTasks().withType(Jar.class, (jar) -> jar.manifest((manifest) -> {

buildSrc/src/main/java/org/springframework/gradle/docs/SpringJavadocApiPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void apply(Project project) {
5454
api.doLast(new Action<Task>() {
5555
@Override
5656
public void execute(Task task) {
57-
if (JavaVersion.current().isJava8Compatible()) {
57+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
5858
project.copy((copy) -> copy.from(api.getDestinationDir())
5959
.into(api.getDestinationDir())
6060
.include("element-list")

docs/src/docs/asciidoc/examples/spring-authorization-server-docs-examples.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44

55
group = project.rootProject.group
66
version = project.rootProject.version
7-
sourceCompatibility = "1.8"
7+
sourceCompatibility = "17"
88

99
repositories {
1010
mavenCentral()

docs/src/docs/asciidoc/getting-started.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ If you are just getting started with Spring Authorization Server, the following
66
[[system-requirements]]
77
== System Requirements
88

9-
Spring Authorization Server requires a Java 8 or higher Runtime Environment.
9+
Spring Authorization Server requires a Java 17 or higher Runtime Environment.
1010

1111
[[installing-spring-authorization-server]]
1212
== Installing Spring Authorization Server

samples/custom-consent-authorizationserver/samples-custom-consent-authorizationserver.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
group = project.rootProject.group
88
version = project.rootProject.version
9-
sourceCompatibility = "1.8"
9+
sourceCompatibility = "17"
1010

1111
repositories {
1212
mavenCentral()

samples/default-authorizationserver/samples-default-authorizationserver.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
group = project.rootProject.group
88
version = project.rootProject.version
9-
sourceCompatibility = "1.8"
9+
sourceCompatibility = "17"
1010

1111
repositories {
1212
mavenCentral()

samples/federated-identity-authorizationserver/samples-federated-identity-authorizationserver.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
group = project.rootProject.group
88
version = project.rootProject.version
9-
sourceCompatibility = "1.8"
9+
sourceCompatibility = "17"
1010

1111
repositories {
1212
mavenCentral()

samples/messages-client/samples-messages-client.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
group = project.rootProject.group
88
version = project.rootProject.version
9-
sourceCompatibility = "1.8"
9+
sourceCompatibility = "17"
1010

1111
repositories {
1212
mavenCentral()

samples/messages-resource/samples-messages-resource.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
group = project.rootProject.group
88
version = project.rootProject.version
9-
sourceCompatibility = "1.8"
9+
sourceCompatibility = "17"
1010

1111
repositories {
1212
mavenCentral()

0 commit comments

Comments
 (0)