diff --git a/src/main/java/rife/bld/extension/kotlin/CompileOptions.java b/src/main/java/rife/bld/extension/kotlin/CompileOptions.java index 64f46e3..e43adc8 100644 --- a/src/main/java/rife/bld/extension/kotlin/CompileOptions.java +++ b/src/main/java/rife/bld/extension/kotlin/CompileOptions.java @@ -388,7 +388,7 @@ public class CompileOptions { args.add("-verbose"); } - // Wwrror + // Werror if (wError_) { args.add("-Werror"); } @@ -398,9 +398,15 @@ public class CompileOptions { args.add("-Wextra"); } - // advanced option (X) + // advanced options (X) if (!advancedOptions_.isEmpty()) { - advancedOptions_.forEach(it -> args.add("-X" + it)); + advancedOptions_.forEach(it -> { + if (it.startsWith("-X")) { + args.add(it); + } else { + args.add("-X" + it); + } + }); } return args; @@ -691,7 +697,7 @@ public class CompileOptions { * Limit the API of the JDK in the classpath to the specified Java version. Automatically sets * {@link #jvmTarget(String) JVM target} version. *

- * Possible values are 1.8, 9, 10, ..., 22. The default value is 1.8. + * Possible values are 1.8, 9, 10, ..., 23. The default value is 1.8. * * @param version the target version * @return this operation instance @@ -706,8 +712,6 @@ public class CompileOptions { *

* Limit the API of the JDK in the classpath to the specified Java version. Automatically sets * {@link #jvmTarget(String) JVM target} version. - *

- * Possible values are 1.8, 9, 10, ..., 22. The default value is 1.8. * * @param version the target version * @return this operation instance @@ -731,7 +735,7 @@ public class CompileOptions { /** * Specify the target version of the generated JVM bytecode. *

- * Possible values are 1.8, 9, 10, ..., 22. The default value is 1.8. + * Possible values are 1.8, 9, 10, ..., 23. The default value is 1.8. * * @param target the target version * @return this operation instance diff --git a/src/test/java/rife/bld/extension/kotlin/CompileOptionsTest.java b/src/test/java/rife/bld/extension/kotlin/CompileOptionsTest.java index 5b36483..c6e6965 100644 --- a/src/test/java/rife/bld/extension/kotlin/CompileOptionsTest.java +++ b/src/test/java/rife/bld/extension/kotlin/CompileOptionsTest.java @@ -112,7 +112,7 @@ class CompileOptionsTest { @Test void testArgsCollections() { - var advanceOptions = List.of("Xoption1", "Xoption2"); + var advanceOptions = List.of("-Xoption1", "option=2"); var argFile = List.of(new File("arg1.txt"), new File("arg2.txt")); var classpath = List.of(new File("path1"), new File("path2")); var optIn = List.of("opt1", "opt2"); @@ -160,7 +160,7 @@ class CompileOptionsTest { "-foo", "-bar", "-script-templates", "temp1,temp2", - "-XXoption1", "-XXoption2", + "-Xoption1", "-Xoption=2", "-P", "plugin:id:name:value", "-P", "plugin:id2:name2:value2");