diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index aa12e0d..170c5b5 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -35,9 +35,9 @@ public class ExampleBuild extends Project { .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin)) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1))) - .include(dependency("org.junit.platform", "junit-platform-launcher", version(1, 12, 1))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 2))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 2))) + .include(dependency("org.junit.platform", "junit-platform-launcher", version(1, 12, 2))); // Include the Kotlin source directory when creating or publishing sources Java Archives jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin")); diff --git a/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java b/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java index d4830fd..53e84c7 100644 --- a/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java +++ b/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java @@ -46,8 +46,8 @@ public class CompileKotlinOperationBuild extends Project { scope(compile) .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 1))); scope(test) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1))) + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 2))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 2))) .include(dependency("org.assertj", "assertj-core", version(3, 27, 3))); javadocOperation() 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");