Upgrade to Java 17
Closes gh-832
This commit is contained in:
@@ -52,9 +52,9 @@ In the instructions below, https://vimeo.com/34436402[`./gradlew`] is invoked fr
|
|||||||
a cross-platform, self-contained bootstrap mechanism for the build.
|
a cross-platform, self-contained bootstrap mechanism for the build.
|
||||||
|
|
||||||
=== Prerequisites
|
=== Prerequisites
|
||||||
https://help.github.com/set-up-git-redirect[Git] and the https://www.oracle.com/technetwork/java/javase/downloads[JDK8 build].
|
https://help.github.com/set-up-git-redirect[Git] and the https://www.oracle.com/technetwork/java/javase/downloads[JDK17 build].
|
||||||
|
|
||||||
Be sure that your `JAVA_HOME` environment variable points to the `jdk1.8.0` folder extracted from the JDK download.
|
Be sure that your `JAVA_HOME` environment variable points to the `jdk17` folder extracted from the JDK download.
|
||||||
|
|
||||||
=== Check out sources
|
=== Check out sources
|
||||||
[indent=0]
|
[indent=0]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ plugins {
|
|||||||
id "groovy"
|
id "groovy"
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class SpringJavaPlugin implements Plugin<Project> {
|
|||||||
|
|
||||||
// Apply Java source compatibility version
|
// Apply Java source compatibility version
|
||||||
JavaPluginExtension java = project.getExtensions().getByType(JavaPluginExtension.class);
|
JavaPluginExtension java = project.getExtensions().getByType(JavaPluginExtension.class);
|
||||||
java.setTargetCompatibility(JavaVersion.VERSION_1_8);
|
java.setTargetCompatibility(JavaVersion.VERSION_17);
|
||||||
|
|
||||||
// Configure Java tasks
|
// Configure Java tasks
|
||||||
project.getTasks().withType(JavaCompile.class, (javaCompile) -> {
|
project.getTasks().withType(JavaCompile.class, (javaCompile) -> {
|
||||||
@@ -81,7 +81,7 @@ public class SpringJavaPlugin implements Plugin<Project> {
|
|||||||
options.setEncoding("UTF-8");
|
options.setEncoding("UTF-8");
|
||||||
options.getCompilerArgs().add("-parameters");
|
options.getCompilerArgs().add("-parameters");
|
||||||
if (JavaVersion.current().isJava11Compatible()) {
|
if (JavaVersion.current().isJava11Compatible()) {
|
||||||
options.getRelease().set(8);
|
options.getRelease().set(17);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
project.getTasks().withType(Jar.class, (jar) -> jar.manifest((manifest) -> {
|
project.getTasks().withType(Jar.class, (jar) -> jar.manifest((manifest) -> {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class SpringJavadocApiPlugin implements Plugin<Project> {
|
|||||||
api.doLast(new Action<Task>() {
|
api.doLast(new Action<Task>() {
|
||||||
@Override
|
@Override
|
||||||
public void execute(Task task) {
|
public void execute(Task task) {
|
||||||
if (JavaVersion.current().isJava8Compatible()) {
|
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
|
||||||
project.copy((copy) -> copy.from(api.getDestinationDir())
|
project.copy((copy) -> copy.from(api.getDestinationDir())
|
||||||
.into(api.getDestinationDir())
|
.into(api.getDestinationDir())
|
||||||
.include("element-list")
|
.include("element-list")
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ plugins {
|
|||||||
|
|
||||||
group = project.rootProject.group
|
group = project.rootProject.group
|
||||||
version = project.rootProject.version
|
version = project.rootProject.version
|
||||||
sourceCompatibility = "1.8"
|
sourceCompatibility = "17"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ If you are just getting started with Spring Authorization Server, the following
|
|||||||
[[system-requirements]]
|
[[system-requirements]]
|
||||||
== System Requirements
|
== System Requirements
|
||||||
|
|
||||||
Spring Authorization Server requires a Java 8 or higher Runtime Environment.
|
Spring Authorization Server requires a Java 17 or higher Runtime Environment.
|
||||||
|
|
||||||
[[installing-spring-authorization-server]]
|
[[installing-spring-authorization-server]]
|
||||||
== Installing Spring Authorization Server
|
== Installing Spring Authorization Server
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ plugins {
|
|||||||
|
|
||||||
group = project.rootProject.group
|
group = project.rootProject.group
|
||||||
version = project.rootProject.version
|
version = project.rootProject.version
|
||||||
sourceCompatibility = "1.8"
|
sourceCompatibility = "17"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ plugins {
|
|||||||
|
|
||||||
group = project.rootProject.group
|
group = project.rootProject.group
|
||||||
version = project.rootProject.version
|
version = project.rootProject.version
|
||||||
sourceCompatibility = "1.8"
|
sourceCompatibility = "17"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ plugins {
|
|||||||
|
|
||||||
group = project.rootProject.group
|
group = project.rootProject.group
|
||||||
version = project.rootProject.version
|
version = project.rootProject.version
|
||||||
sourceCompatibility = "1.8"
|
sourceCompatibility = "17"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ plugins {
|
|||||||
|
|
||||||
group = project.rootProject.group
|
group = project.rootProject.group
|
||||||
version = project.rootProject.version
|
version = project.rootProject.version
|
||||||
sourceCompatibility = "1.8"
|
sourceCompatibility = "17"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ plugins {
|
|||||||
|
|
||||||
group = project.rootProject.group
|
group = project.rootProject.group
|
||||||
version = project.rootProject.version
|
version = project.rootProject.version
|
||||||
sourceCompatibility = "1.8"
|
sourceCompatibility = "17"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
Reference in New Issue
Block a user