Compare commits

...

2 commits

Author SHA1 Message Date
574205d548
Advance options should start with -X 2025-04-15 10:51:10 -07:00
9c633116dc
Bump JUnit to version 5.12.2 2025-04-12 18:48:21 -07:00
4 changed files with 18 additions and 14 deletions

View file

@ -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"));

View file

@ -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()

View file

@ -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.
* <p>
* 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 {
* <p>
* Limit the API of the JDK in the classpath to the specified Java version. Automatically sets
* {@link #jvmTarget(String) JVM target} version.
* <p>
* 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.
* <p>
* 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

View file

@ -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");