Upgrade to Java 17
Closes gh-832
This commit is contained in:
@@ -73,7 +73,7 @@ public class SpringJavaPlugin implements Plugin<Project> {
|
||||
|
||||
// Apply Java source compatibility version
|
||||
JavaPluginExtension java = project.getExtensions().getByType(JavaPluginExtension.class);
|
||||
java.setTargetCompatibility(JavaVersion.VERSION_1_8);
|
||||
java.setTargetCompatibility(JavaVersion.VERSION_17);
|
||||
|
||||
// Configure Java tasks
|
||||
project.getTasks().withType(JavaCompile.class, (javaCompile) -> {
|
||||
@@ -81,7 +81,7 @@ public class SpringJavaPlugin implements Plugin<Project> {
|
||||
options.setEncoding("UTF-8");
|
||||
options.getCompilerArgs().add("-parameters");
|
||||
if (JavaVersion.current().isJava11Compatible()) {
|
||||
options.getRelease().set(8);
|
||||
options.getRelease().set(17);
|
||||
}
|
||||
});
|
||||
project.getTasks().withType(Jar.class, (jar) -> jar.manifest((manifest) -> {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class SpringJavadocApiPlugin implements Plugin<Project> {
|
||||
api.doLast(new Action<Task>() {
|
||||
@Override
|
||||
public void execute(Task task) {
|
||||
if (JavaVersion.current().isJava8Compatible()) {
|
||||
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
|
||||
project.copy((copy) -> copy.from(api.getDestinationDir())
|
||||
.into(api.getDestinationDir())
|
||||
.include("element-list")
|
||||
|
||||
Reference in New Issue
Block a user