Build with Java 8, 11 or 17

Issue gh-761
This commit is contained in:
Steve Riesenberg
2022-06-08 18:06:23 -05:00
parent dc79172a4b
commit 77d665fe97
2 changed files with 4 additions and 1 deletions

View File

@@ -80,6 +80,9 @@ public class SpringJavaPlugin implements Plugin<Project> {
CompileOptions options = javaCompile.getOptions();
options.setEncoding("UTF-8");
options.getCompilerArgs().add("-parameters");
if (JavaVersion.current().isJava11Compatible()) {
options.getRelease().set(8);
}
});
project.getTasks().withType(Jar.class, (jar) -> jar.manifest((manifest) -> {
Map<String, String> attributes = new HashMap<>();