Downgrade to Java 8
Closes gh-761
This commit is contained in:
@@ -73,14 +73,13 @@ public class SpringJavaPlugin implements Plugin<Project> {
|
||||
|
||||
// Apply Java source compatibility version
|
||||
JavaPluginExtension java = project.getExtensions().getByType(JavaPluginExtension.class);
|
||||
java.setTargetCompatibility(JavaVersion.VERSION_11);
|
||||
java.setTargetCompatibility(JavaVersion.VERSION_1_8);
|
||||
|
||||
// Configure Java tasks
|
||||
project.getTasks().withType(JavaCompile.class, (javaCompile) -> {
|
||||
CompileOptions options = javaCompile.getOptions();
|
||||
options.setEncoding("UTF-8");
|
||||
options.getCompilerArgs().add("-parameters");
|
||||
options.getRelease().set(11);
|
||||
});
|
||||
project.getTasks().withType(Jar.class, (jar) -> jar.manifest((manifest) -> {
|
||||
Map<String, String> attributes = new HashMap<>();
|
||||
|
||||
@@ -54,7 +54,7 @@ public class SpringJavadocApiPlugin implements Plugin<Project> {
|
||||
api.doLast(new Action<Task>() {
|
||||
@Override
|
||||
public void execute(Task task) {
|
||||
if (JavaVersion.current().isJava11Compatible()) {
|
||||
if (JavaVersion.current().isJava8Compatible()) {
|
||||
project.copy((copy) -> copy.from(api.getDestinationDir())
|
||||
.into(api.getDestinationDir())
|
||||
.include("element-list")
|
||||
|
||||
@@ -30,8 +30,6 @@ public class SpringJavadocOptionsPlugin implements Plugin<Project> {
|
||||
project.getTasks().withType(Javadoc.class, (javadoc) -> {
|
||||
StandardJavadocDocletOptions options = (StandardJavadocDocletOptions) javadoc.getOptions();
|
||||
options.addStringOption("Xdoclint:none", "-quiet");
|
||||
// Workaround for Java 11 javadoc search bug. Can be removed with Java 17.
|
||||
options.addBooleanOption("-no-module-directories", true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user