From 7ef666f1733c970c22f3dcc63d37dd24b68e4e85 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 25 Mar 2020 15:21:15 +0100 Subject: [PATCH 1/3] Generate projects for Java 11 by default --- .../templates/basic-rest/java/build.gradle-template.ftl | 4 ++-- .../templates/basic-rest/java/pom.xml-template.ftl | 4 ++-- .../basic-rest/kotlin/build.gradle-template.ftl | 8 ++++---- .../templates/basic-rest/kotlin/pom.xml-template.ftl | 6 +++--- .../templates/basic-rest/scala/build.gradle-template.ftl | 9 ++++++++- .../templates/basic-rest/scala/pom.xml-template.ftl | 4 ++-- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl index e1ca50e155669..94dbf2d5b54f0 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl @@ -29,7 +29,7 @@ compileTestJava { } java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl index 846cd4a95fb95..1e1c09d4fb6af 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - 1.8 - 1.8 + 11 + 11 true ${bom_artifactId} diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl index f604d4391c0da..0233e2f7203d9 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl @@ -36,15 +36,15 @@ allOpen { } java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } compileKotlin { - kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8 + kotlinOptions.jvmTarget = JavaVersion.VERSION_11 kotlinOptions.javaParameters = true } compileTestKotlin { - kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8 + kotlinOptions.jvmTarget = JavaVersion.VERSION_11 } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl index 1fb4dc6cd9a89..3afebd68b19e4 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - 1.8 - 1.8 + 11 + 11 true ${bom_artifactId} @@ -107,7 +107,7 @@ true - 1.8 + 11 all-open diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl index 84873ec16ae9d..8d4f2109c0b1a 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl @@ -21,5 +21,12 @@ group '${project_groupId}' version '${project_version}' compileScala { - scalaCompileOptions.encoding = 'UTF-8' + scalaCompileOptions.encoding = 'UTF-8' + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} + +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl index 54aefd585decb..017c713dd13d6 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - 1.8 - 1.8 + 11 + 11 true ${bom_artifactId} From 36ca0171102cddf80aa6def23766759b40cc396c Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 25 Mar 2020 17:28:28 +0100 Subject: [PATCH 2/3] Parameterize the Java target By default, it is based on the Java version used to create the project. It can be overridden in CreateProject though if you really want to enforce it in your tools. I haven't exposed it for now as we will probably remove it or tweak it later. Note that even if you enforce it, it will still use either 8 or 11 for now. We might want to further enhance that later. --- .../basic-rest/java/build.gradle-template.ftl | 4 ++-- .../basic-rest/java/pom.xml-template.ftl | 4 ++-- .../kotlin/build.gradle-template.ftl | 8 +++---- .../basic-rest/kotlin/pom.xml-template.ftl | 6 ++--- .../scala/build.gradle-template.ftl | 8 +++---- .../basic-rest/scala/pom.xml-template.ftl | 4 ++-- .../quarkus/cli/commands/CreateProject.java | 22 +++++++++++++++++++ .../quarkus/generators/ProjectGenerator.java | 1 + 8 files changed, 40 insertions(+), 17 deletions(-) diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl index 94dbf2d5b54f0..d8047029f8a48 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl @@ -29,7 +29,7 @@ compileTestJava { } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_${java_target} + targetCompatibility = JavaVersion.VERSION_${java_target} } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl index 1e1c09d4fb6af..f8c3060873917 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - 11 - 11 + ${java_target} + ${java_target} true ${bom_artifactId} diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl index 0233e2f7203d9..2137fcc2e69e7 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl @@ -36,15 +36,15 @@ allOpen { } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_${java_target} + targetCompatibility = JavaVersion.VERSION_${java_target} } compileKotlin { - kotlinOptions.jvmTarget = JavaVersion.VERSION_11 + kotlinOptions.jvmTarget = JavaVersion.VERSION_${java_target} kotlinOptions.javaParameters = true } compileTestKotlin { - kotlinOptions.jvmTarget = JavaVersion.VERSION_11 + kotlinOptions.jvmTarget = JavaVersion.VERSION_${java_target} } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl index 3afebd68b19e4..01bd5a1c273ff 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - 11 - 11 + ${java_target} + ${java_target} true ${bom_artifactId} @@ -107,7 +107,7 @@ true - 11 + ${java_target} all-open diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl index 8d4f2109c0b1a..fb4793129c3d6 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl @@ -22,11 +22,11 @@ version '${project_version}' compileScala { scalaCompileOptions.encoding = 'UTF-8' - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_${java_target} + targetCompatibility = JavaVersion.VERSION_${java_target} } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_${java_target} + targetCompatibility = JavaVersion.VERSION_${java_target} } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl index 017c713dd13d6..3ad95b1eb8e25 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - 11 - 11 + ${java_target} + ${java_target} true ${bom_artifactId} diff --git a/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java b/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java index db5df11fb01dc..89e4ef49d1f9b 100644 --- a/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java +++ b/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java @@ -2,6 +2,7 @@ import static io.quarkus.generators.ProjectGenerator.CLASS_NAME; import static io.quarkus.generators.ProjectGenerator.IS_SPRING; +import static io.quarkus.generators.ProjectGenerator.JAVA_TARGET; import static io.quarkus.generators.ProjectGenerator.PROJECT_ARTIFACT_ID; import static io.quarkus.generators.ProjectGenerator.PROJECT_GROUP_ID; import static io.quarkus.generators.ProjectGenerator.PROJECT_VERSION; @@ -18,6 +19,8 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.lang.model.SourceVersion; /** @@ -27,6 +30,8 @@ */ public class CreateProject { + private static final Pattern JAVA_VERSION_PATTERN = Pattern.compile("(?:1\\.)?(\\d+)(?:\\..*)?"); + public static SourceType determineSourceType(Set extensions) { Optional sourceType = extensions.stream() .map(SourceType::parse) @@ -42,6 +47,8 @@ private static boolean isSpringStyle(Collection extensions) { private QuarkusCommandInvocation invocation; + private String javaTarget; + /** * @deprecated since 1.3.0.CR1 * Please use {@link #CreateProject(ProjectWriter, QuarkusPlatformDescriptor)} instead. @@ -76,6 +83,11 @@ public CreateProject sourceType(SourceType sourceType) { return this; } + public CreateProject javaTarget(String javaTarget) { + this.javaTarget = javaTarget; + return this; + } + public CreateProject className(String className) { if (className == null) { return this; @@ -126,6 +138,7 @@ public boolean doCreateProject(final Map context) throws IOExcep } } } + try { return execute().isSuccess(); } catch (QuarkusCommandException e) { @@ -134,6 +147,15 @@ public boolean doCreateProject(final Map context) throws IOExcep } public QuarkusCommandOutcome execute() throws QuarkusCommandException { + // Define the Java version to use determined from the one specified or the one creating the project + Matcher matcher = JAVA_VERSION_PATTERN + .matcher(this.javaTarget != null ? this.javaTarget : System.getProperty("java.version", "")); + if (matcher.matches() && Integer.parseInt(matcher.group(1)) < 11) { + invocation.setProperty(JAVA_TARGET, invocation.getBuildTool() == BuildTool.MAVEN ? "1.8" : "1_8"); + } else { + invocation.setProperty(JAVA_TARGET, "11"); + } + return new CreateProjectCommandHandler().execute(invocation); } } diff --git a/independent-projects/tools/common/src/main/java/io/quarkus/generators/ProjectGenerator.java b/independent-projects/tools/common/src/main/java/io/quarkus/generators/ProjectGenerator.java index fb4686a450e90..ef9a66f4a60cc 100644 --- a/independent-projects/tools/common/src/main/java/io/quarkus/generators/ProjectGenerator.java +++ b/independent-projects/tools/common/src/main/java/io/quarkus/generators/ProjectGenerator.java @@ -22,6 +22,7 @@ public interface ProjectGenerator { String CLASS_NAME = "class_name"; String IS_SPRING = "is_spring"; String RESOURCE_PATH = "path"; + String JAVA_TARGET = "java_target"; String getName(); From a2a8a8498f7f1669bc60c19922acf035a6b85b90 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 26 Mar 2020 09:51:45 +0100 Subject: [PATCH 3/3] Keep template files compatible with Maven plugin < 1.3.1 --- .../basic-rest/java/build.gradle-template.ftl | 4 ++-- .../basic-rest/java/pom.xml-template.ftl | 4 ++-- .../kotlin/build.gradle-template.ftl | 8 ++++---- .../basic-rest/kotlin/pom.xml-template.ftl | 6 +++--- .../scala/build.gradle-template.ftl | 8 ++++---- .../basic-rest/scala/pom.xml-template.ftl | 4 ++-- .../quarkus/cli/commands/CreateProject.java | 2 +- .../rest/BasicRestProjectGenerator.java | 19 +++++++++++++++++++ 8 files changed, 37 insertions(+), 18 deletions(-) diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl index d8047029f8a48..e1ca50e155669 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/build.gradle-template.ftl @@ -29,7 +29,7 @@ compileTestJava { } java { - sourceCompatibility = JavaVersion.VERSION_${java_target} - targetCompatibility = JavaVersion.VERSION_${java_target} + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl index f8c3060873917..846cd4a95fb95 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/java/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - ${java_target} - ${java_target} + 1.8 + 1.8 true ${bom_artifactId} diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl index 2137fcc2e69e7..f604d4391c0da 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl @@ -36,15 +36,15 @@ allOpen { } java { - sourceCompatibility = JavaVersion.VERSION_${java_target} - targetCompatibility = JavaVersion.VERSION_${java_target} + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } compileKotlin { - kotlinOptions.jvmTarget = JavaVersion.VERSION_${java_target} + kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8 kotlinOptions.javaParameters = true } compileTestKotlin { - kotlinOptions.jvmTarget = JavaVersion.VERSION_${java_target} + kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8 } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl index 01bd5a1c273ff..1fb4dc6cd9a89 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - ${java_target} - ${java_target} + 1.8 + 1.8 true ${bom_artifactId} @@ -107,7 +107,7 @@ true - ${java_target} + 1.8 all-open diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl index fb4793129c3d6..1598513be40b9 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl @@ -22,11 +22,11 @@ version '${project_version}' compileScala { scalaCompileOptions.encoding = 'UTF-8' - sourceCompatibility = JavaVersion.VERSION_${java_target} - targetCompatibility = JavaVersion.VERSION_${java_target} + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } java { - sourceCompatibility = JavaVersion.VERSION_${java_target} - targetCompatibility = JavaVersion.VERSION_${java_target} + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl index 3ad95b1eb8e25..54aefd585decb 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/pom.xml-template.ftl @@ -8,8 +8,8 @@ UTF-8 UTF-8 - ${java_target} - ${java_target} + 1.8 + 1.8 true ${bom_artifactId} diff --git a/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java b/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java index 89e4ef49d1f9b..fcc0e19e8c965 100644 --- a/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java +++ b/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java @@ -151,7 +151,7 @@ public QuarkusCommandOutcome execute() throws QuarkusCommandException { Matcher matcher = JAVA_VERSION_PATTERN .matcher(this.javaTarget != null ? this.javaTarget : System.getProperty("java.version", "")); if (matcher.matches() && Integer.parseInt(matcher.group(1)) < 11) { - invocation.setProperty(JAVA_TARGET, invocation.getBuildTool() == BuildTool.MAVEN ? "1.8" : "1_8"); + invocation.setProperty(JAVA_TARGET, "8"); } else { invocation.setProperty(JAVA_TARGET, "11"); } diff --git a/independent-projects/tools/common/src/main/java/io/quarkus/generators/rest/BasicRestProjectGenerator.java b/independent-projects/tools/common/src/main/java/io/quarkus/generators/rest/BasicRestProjectGenerator.java index 2049877a58c39..ad20146203a15 100644 --- a/independent-projects/tools/common/src/main/java/io/quarkus/generators/rest/BasicRestProjectGenerator.java +++ b/independent-projects/tools/common/src/main/java/io/quarkus/generators/rest/BasicRestProjectGenerator.java @@ -1,5 +1,6 @@ package io.quarkus.generators.rest; +import static io.quarkus.generators.ProjectGenerator.JAVA_TARGET; import static java.lang.String.format; import io.quarkus.cli.commands.QuarkusCommandInvocation; @@ -144,6 +145,24 @@ private void generate(final String templateName, QuarkusCommandInvocation invoca template = template.replace(format("${%s}", e.getKey().toString()), e.getValue().toString()); } } + + // do some nasty replacements for Java target if we want to generate Java 11 projects + if ("11".equals(invocation.getProperty(JAVA_TARGET))) { + if (BuildTool.GRADLE.equals(invocation.getBuildTool())) { + template = template.replace("JavaVersion.VERSION_1_8", "JavaVersion.VERSION_11"); + } else { + template = template.replace("1.8", + "11"); + template = template.replace("1.8", + "11"); + // Kotlin + template = template.replace("1.8", "11"); + // Scala + // For now, we keep Java 8 as a target for Scala as we don't want to upgrade to 2.13 + // template = template.replace("-target:jvm-1.8", "-target:jvm-11"); + } + } + writer.write(outputFilePath, template); } }