Compare commits

..

2 commits

5 changed files with 176 additions and 129 deletions

View file

@ -1,7 +1,7 @@
bld.downloadExtensionJavadoc=false bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.downloadLocation= bld.downloadLocation=
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.1 bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.2
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories= bld.sourceDirectories=
bld.version=2.1.0 bld.version=2.1.0

View file

@ -33,7 +33,7 @@ public class CompileKotlinOperationBuild extends Project {
public CompileKotlinOperationBuild() { public CompileKotlinOperationBuild() {
pkg = "rife.bld.extension"; pkg = "rife.bld.extension";
name = "bld-kotlin"; name = "bld-kotlin";
version = version(1, 0, 1); version = version(1, 0, 2);
javaRelease = 17; javaRelease = 17;
@ -57,28 +57,26 @@ public class CompileKotlinOperationBuild extends Project {
publishOperation() publishOperation()
.repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2")) .repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2"))
.repository(repository("github"))
.info() .info()
.groupId("com.uwyn.rife2") .groupId("com.uwyn.rife2")
.artifactId("bld-kotlin") .artifactId("bld-kotlin")
.description("bld Kotlin Extension") .description("bld Kotlin Extension")
.url("https://github.com/rife2/bld-kotlin") .url("https://github.com/rife2/bld-kotlin")
.developer( .developer(new PublishDeveloper()
new PublishDeveloper() .id("ethauvin")
.id("ethauvin") .name("Erik C. Thauvin")
.name("Erik C. Thauvin") .email("erik@thauvin.net")
.email("erik@thauvin.net") .url("https://erik.thauvin.net/")
.url("https://erik.thauvin.net/")
) )
.license( .license(new PublishLicense()
new PublishLicense() .name("The Apache License, Version 2.0")
.name("The Apache License, Version 2.0") .url("https://www.apache.org/licenses/LICENSE-2.0.txt")
.url("https://www.apache.org/licenses/LICENSE-2.0.txt")
) )
.scm( .scm(new PublishScm()
new PublishScm() .connection("scm:git:https://github.com/rife2/bld-kotlin.git")
.connection("scm:git:https://github.com/rife2/bld-kotlin.git") .developerConnection("scm:git:git@github.com:rife2/bld-kotlin.git")
.developerConnection("scm:git:git@github.com:rife2/bld-kotlin.git") .url("https://github.com/rife2/bld-kotlin")
.url("https://github.com/rife2/bld-kotlin")
) )
.signKey(property("sign.key")) .signKey(property("sign.key"))
.signPassphrase(property("sign.passphrase")); .signPassphrase(property("sign.passphrase"));

View file

@ -284,8 +284,16 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
protected void executeBuildSources(Collection<String> classpath, Collection<File> sources, File destination, protected void executeBuildSources(Collection<String> classpath, Collection<File> sources, File destination,
File friendPaths) File friendPaths)
throws ExitStatusException { throws ExitStatusException {
if (sources.isEmpty() || destination == null) { if (sources.isEmpty()) {
if (!silent() && LOGGER.isLoggable(Level.WARNING)) {
LOGGER.warning("Nothing to compile.");
}
return; return;
} else if (destination == null) {
if (!silent() && LOGGER.isLoggable(Level.SEVERE)) {
LOGGER.severe("No destination specified.");
}
throw new ExitStatusException(ExitStatusException.EXIT_FAILURE);
} }
var args = new ArrayList<String>(); var args = new ArrayList<String>();
@ -294,8 +302,10 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
args.add(kotlinCompiler()); args.add(kotlinCompiler());
// classpath // classpath
args.add("-cp"); if (classpath != null && !classpath.isEmpty()) {
args.add(FileUtils.joinPaths(classpath.stream().toList())); args.add("-cp");
args.add(FileUtils.joinPaths(classpath.stream().toList()));
}
// destination // destination
args.add("-d"); args.add("-d");
@ -376,16 +386,16 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
* <p> * <p>
* Sets the following from the project: * Sets the following from the project:
* <ul> * <ul>
* <li>{@link #kotlinHome()} to the {@code KOTLIN_HOME} environment variable, if set.</li> * <li>{@link #kotlinHome() kotlinHome} to the {@code KOTLIN_HOME} environment variable, if set.</li>
* <li>{@link #workDir()} to the project's directory.</li> * <li>{@link #workDir() workDir} to the project's directory.</li>
* <li>{@link #buildMainDirectory() buildMainDirectory}</li> * <li>{@link #buildMainDirectory() buildMainDirectory}</li>
* <li>{@link #buildTestDirectory() buildTestDirectory}</li> * <li>{@link #buildTestDirectory() buildTestDirectory}</li>
* <li>{@link #compileMainClasspath() compileMainClassPath}</li> * <li>{@link #compileMainClasspath() compileMainClassPath}</li>
* <li>{@link #compileTestClasspath() compilesTestClassPath}</li> * <li>{@link #compileTestClasspath() compilesTestClassPath}</li>
* <li>{@link #mainSourceDirectories()} () mainSourceDirectories} to the {@code kotlin} directory in * <li>{@link #mainSourceDirectories() mainSourceDirectories} to the {@code kotlin} directory in
* {@link BaseProject#srcMainDirectory() srcMainDirectory}</li> * {@link BaseProject#srcMainDirectory() srcMainDirectory}, if present.</li>
* <li>{@link #testSourceDirectories() testSourceDirectories} to the {@code kotlin} directory in * <li>{@link #testSourceDirectories() testSourceDirectories} to the {@code kotlin} directory in
* {@link BaseProject#srcTestDirectory() srcTestDirectory}</li> * {@link BaseProject#srcTestDirectory() srcTestDirectory}, if present.</li>
* <li>{@link CompileOptions#jdkRelease jdkRelease} to {@link BaseProject#javaRelease() javaRelease}</li> * <li>{@link CompileOptions#jdkRelease jdkRelease} to {@link BaseProject#javaRelease() javaRelease}</li>
* <li>{@link CompileOptions#noStdLib(boolean) noStdLib} to {@code true}</li> * <li>{@link CompileOptions#noStdLib(boolean) noStdLib} to {@code true}</li>
* </ul> * </ul>
@ -406,9 +416,17 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
var op = buildMainDirectory(project.buildMainDirectory()) var op = buildMainDirectory(project.buildMainDirectory())
.buildTestDirectory(project.buildTestDirectory()) .buildTestDirectory(project.buildTestDirectory())
.compileMainClasspath(project.compileMainClasspath()) .compileMainClasspath(project.compileMainClasspath())
.compileTestClasspath(project.compileTestClasspath()) .compileTestClasspath(project.compileTestClasspath());
.mainSourceDirectories(new File(project.srcMainDirectory(), "kotlin"))
.testSourceDirectories(new File(project.srcTestDirectory(), "kotlin")); var mainDir = new File(project.srcMainDirectory(), "kotlin");
if (mainDir.exists()) {
op = op.mainSourceDirectories(mainDir);
}
var testDir = new File(project.srcTestDirectory(), "kotlin");
if (testDir.exists()) {
op = op.testSourceDirectories(testDir);
}
if (project.javaRelease() != null && !compileOptions_.hasRelease()) { if (project.javaRelease() != null && !compileOptions_.hasRelease()) {
compileOptions_.jdkRelease(project.javaRelease()); compileOptions_.jdkRelease(project.javaRelease());
} }

View file

@ -16,10 +16,10 @@
package rife.bld.extension; package rife.bld.extension;
import org.assertj.core.api.AutoCloseableSoftAssertions;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import rife.bld.BaseProject; import rife.bld.BaseProject;
import rife.bld.Project;
import rife.bld.blueprints.BaseProjectBlueprint; import rife.bld.blueprints.BaseProjectBlueprint;
import rife.bld.extension.kotlin.CompileOptions; import rife.bld.extension.kotlin.CompileOptions;
import rife.bld.extension.kotlin.CompilerPlugin; import rife.bld.extension.kotlin.CompilerPlugin;
@ -86,7 +86,7 @@ class CompileKotlinOperationTest {
@Test @Test
void testCollections() { void testCollections() {
var op = new CompileKotlinOperation() var op = new CompileKotlinOperation()
.fromProject(new Project()) .fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", "Example"))
.kotlinHome("/kotlin_home") .kotlinHome("/kotlin_home")
.kotlinc("kotlinc") .kotlinc("kotlinc")
.workDir("work_dir") .workDir("work_dir")
@ -110,35 +110,36 @@ class CompileKotlinOperationTest {
.plugins(List.of("plugin3", "plugin4")); .plugins(List.of("plugin3", "plugin4"));
assertThat(op.kotlinHome().getName()).as("kotlin_home").isEqualTo("kotlin_home"); try (var softly = new AutoCloseableSoftAssertions()) {
assertThat(op.kotlinc().getName()).as("kotlinc").isEqualTo("kotlinc"); softly.assertThat(op.kotlinHome().getName()).as("kotlin_home").isEqualTo("kotlin_home");
assertThat(op.workDir().getName()).as("work_dir").isEqualTo("work_dir"); softly.assertThat(op.kotlinc().getName()).as("kotlinc").isEqualTo("kotlinc");
softly.assertThat(op.workDir().getName()).as("work_dir").isEqualTo("work_dir");
assertThat(op.compileMainClasspath()).as("compileMainClassPath") softly.assertThat(op.compileMainClasspath()).as("compileMainClassPath")
.containsAll(List.of("path1", "path2")); .containsAll(List.of("path1", "path2"));
assertThat(op.compileOptions().hasRelease()).as("hasRelease").isTrue(); softly.assertThat(op.compileOptions().hasRelease()).as("hasRelease").isTrue();
assertThat(op.compileOptions().isVerbose()).as("isVerbose").isTrue(); softly.assertThat(op.compileOptions().isVerbose()).as("isVerbose").isTrue();
assertThat(op.mainSourceDirectories()).as("mainSourceDirectories").containsExactly( softly.assertThat(op.mainSourceDirectories()).as("mainSourceDirectories").containsExactly(
Path.of("src", "main", "kotlin").toFile().getAbsoluteFile(), new File("dir1"), Path.of("examples", "src", "main", "kotlin").toFile(), new File("dir1"),
new File("dir2"), new File("dir3"), new File("dir4")); new File("dir2"), new File("dir3"), new File("dir4"));
assertThat(op.testSourceDirectories()).as("testSourceDirectories").containsOnly( softly.assertThat(op.testSourceDirectories()).as("testSourceDirectories").containsOnly(
Path.of("src", "test", "kotlin").toFile().getAbsoluteFile(), new File("tdir1"), Path.of("examples", "src", "test", "kotlin").toFile(), new File("tdir1"),
new File("tdir2"), new File("tdir3"), new File("tdir4")); new File("tdir2"), new File("tdir3"), new File("tdir4"));
assertThat(op.mainSourceFiles()).as("mainSourceFiles").containsOnly( softly.assertThat(op.mainSourceFiles()).as("mainSourceFiles").containsOnly(
new File("file1"), new File("file2"), new File("file3"), new File("file1"), new File("file2"), new File("file3"),
new File("file4"), new File("file5"), new File("file6")); new File("file4"), new File("file5"), new File("file6"));
assertThat(op.testSourceFiles()).as("testSourceFiles").containsOnly( softly.assertThat(op.testSourceFiles()).as("testSourceFiles").containsOnly(
new File("tfile1"), new File("tfile2"), new File("tfile3"), new File("tfile1"), new File("tfile2"), new File("tfile3"),
new File("tfile4"), new File("tfile5"), new File("tfile6")); new File("tfile4"), new File("tfile5"), new File("tfile6"));
assertThat(op.plugins()).as("plugins").contains("plugin1", "plugin2", "plugin3", "plugin4", softly.assertThat(op.plugins()).as("plugins").contains("plugin1", "plugin2", "plugin3", "plugin4",
"/kotlin_home/lib/kotlin-serialization-compiler-plugin.jar", "/kotlin_home/lib/kotlin-serialization-compiler-plugin.jar",
"/kotlin_home/lib/assignment-compiler-plugin.jar", "/kotlin_home/lib/assignment-compiler-plugin.jar",
new File("lib/compile", "lombok-compiler-plugin.jar").getAbsolutePath(), new File("lib/compile", "lombok-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "power-assert-compiler-plugin.jar").getAbsolutePath(), new File("lib/compile", "power-assert-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "noarg-compiler-plugin.jar").getAbsolutePath(), new File("lib/compile", "noarg-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "allopen-compiler-plugin.jar").getAbsolutePath(), new File("lib/compile", "allopen-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "kotlinx-serialization-compiler-plugin.jar").getAbsolutePath(), new File("lib/compile", "kotlinx-serialization-compiler-plugin.jar").getAbsolutePath(),
new File("lib/compile", "sam-with-receiver-compiler-plugin.jar").getAbsolutePath()); new File("lib/compile", "sam-with-receiver-compiler-plugin.jar").getAbsolutePath());
}
} }
@Test @Test
@ -150,8 +151,10 @@ class CompileKotlinOperationTest {
var mainDir = new File(buildDir, "main"); var mainDir = new File(buildDir, "main");
var testDir = new File(buildDir, "test"); var testDir = new File(buildDir, "test");
assertThat(mainDir.mkdirs()).as("make mainDir").isTrue(); try (var softly = new AutoCloseableSoftAssertions()) {
assertThat(testDir.mkdirs()).as("make testDir").isTrue(); softly.assertThat(mainDir.mkdirs()).as("make mainDir").isTrue();
softly.assertThat(testDir.mkdirs()).as("make testDir").isTrue();
}
var compileJars = new ArrayList<String>(); var compileJars = new ArrayList<String>();
for (var f : Objects.requireNonNull(new File("examples/lib/compile").listFiles())) { for (var f : Objects.requireNonNull(new File("examples/lib/compile").listFiles())) {
@ -182,13 +185,18 @@ class CompileKotlinOperationTest {
op.execute(); op.execute();
assertThat(tmpDir).as("tmpDir").isNotEmptyDirectory(); try (var softly = new AutoCloseableSoftAssertions()) {
assertThat(mainDir).as("mainDir").isNotEmptyDirectory(); softly.assertThat(tmpDir).as("tmpDir").isNotEmptyDirectory();
assertThat(testDir).as("testDir").isNotEmptyDirectory(); softly.assertThat(mainDir).as("mainDir").isNotEmptyDirectory();
softly.assertThat(testDir).as("testDir").isNotEmptyDirectory();
}
var mainOut = Path.of(mainDir.getAbsolutePath(), "com", "example").toFile(); var mainOut = Path.of(mainDir.getAbsolutePath(), "com", "example").toFile();
assertThat(new File(mainOut, "Example.class")).as("Example.class").exists(); try (var softly = new AutoCloseableSoftAssertions()) {
assertThat(new File(mainOut, "Example$Companion.class")).as("ExampleCompanion.class").exists(); softly.assertThat(new File(mainOut, "Example.class")).as("Example.class").exists();
softly.assertThat(new File(mainOut, "Example$Companion.class"))
.as("ExampleCompanion.class").exists();
}
var testOut = Path.of(testDir.getAbsolutePath(), "com", "example").toFile(); var testOut = Path.of(testDir.getAbsolutePath(), "com", "example").toFile();
assertThat(new File(testOut, "ExampleTest.class")).as("ExampleTest.class").exists(); assertThat(new File(testOut, "ExampleTest.class")).as("ExampleTest.class").exists();
@ -197,6 +205,14 @@ class CompileKotlinOperationTest {
} }
} }
@Test
void testFromProjectNoKotlin() {
var op = new CompileKotlinOperation().fromProject(
new BaseProjectBlueprint(new File("foo"), "org.example", "foo"));
assertThat(op.mainSourceDirectories()).isEmpty();
assertThat(op.testSourceDirectories()).isEmpty();
}
@Test @Test
void testKotlinHome() { void testKotlinHome() {
var foo = new File("foo"); var foo = new File("foo");
@ -250,11 +266,13 @@ class CompileKotlinOperationTest {
op.mainSourceDirectories().clear(); op.mainSourceDirectories().clear();
op.mainSourceDirectoriesPaths(List.of(new File(FILE_1).toPath(), new File(FILE_2).toPath())); op.mainSourceDirectoriesPaths(List.of(new File(FILE_1).toPath(), new File(FILE_2).toPath()));
assertThat(op.mainSourceDirectories()).as("List(Path...)").containsExactly(new File(FILE_1), new File(FILE_2)); assertThat(op.mainSourceDirectories()).as("List(Path...)")
.containsExactly(new File(FILE_1), new File(FILE_2));
op.mainSourceDirectories().clear(); op.mainSourceDirectories().clear();
op.mainSourceDirectoriesStrings(List.of(FILE_1, FILE_2)); op.mainSourceDirectoriesStrings(List.of(FILE_1, FILE_2));
assertThat(op.mainSourceDirectories()).as("List(String...)").containsExactly(new File(FILE_1), new File(FILE_2)); assertThat(op.mainSourceDirectories()).as("List(String...)")
.containsExactly(new File(FILE_1), new File(FILE_2));
op.mainSourceDirectories().clear(); op.mainSourceDirectories().clear();
} }
@ -303,8 +321,10 @@ class CompileKotlinOperationTest {
CompilerPlugin.POWER_ASSERT, CompilerPlugin.POWER_ASSERT,
CompilerPlugin.SAM_WITH_RECEIVER); CompilerPlugin.SAM_WITH_RECEIVER);
for (var p : op.plugins()) { try (var softly = new AutoCloseableSoftAssertions()) {
assertThat(new File(p)).as(p).exists(); for (var p : op.plugins()) {
softly.assertThat(new File(p)).as(p).exists();
}
} }
} }

View file

@ -16,6 +16,7 @@
package rife.bld.extension.kotlin; package rife.bld.extension.kotlin;
import org.assertj.core.api.AutoCloseableSoftAssertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import java.io.File; import java.io.File;
@ -102,9 +103,11 @@ class CompileOptionsTest {
args.add(options.args()); args.add(options.args());
args.add(options.apiVersion(11).jvmTarget(11).args()); args.add(options.apiVersion(11).jvmTarget(11).args());
for (var a : args) { try (var softly = new AutoCloseableSoftAssertions()) {
IntStream.range(0, a.size()).forEach(i -> assertThat(a.get(i)) for (var a : args) {
.as(a.get(i) + " == " + matches.get(i)).isEqualTo(matches.get(i))); IntStream.range(0, a.size()).forEach(i -> softly.assertThat(a.get(i))
.as(a.get(i) + " == " + matches.get(i)).isEqualTo(matches.get(i)));
}
} }
} }
@ -134,22 +137,24 @@ class CompileOptionsTest {
op.plugin(p[0], p[1], p[2]); op.plugin(p[0], p[1], p[2]);
}); });
assertThat(op.advancedOptions()).as("advancedOptions") try (var softly = new AutoCloseableSoftAssertions()) {
.hasSize(advanceOptions.size()).containsAll(advanceOptions); softly.assertThat(op.advancedOptions()).as("advancedOptions")
assertThat(op.argFile()).as("argFile") .hasSize(advanceOptions.size()).containsAll(advanceOptions);
.hasSize(argFile.size()).containsAll(argFile); softly.assertThat(op.argFile()).as("argFile")
assertThat(op.classpath()).as("classpath") .hasSize(argFile.size()).containsAll(argFile);
.hasSize(classpath.size()).containsAll(classpath); softly.assertThat(op.classpath()).as("classpath")
assertThat(op.jvmOptions()).as("jvmOptions") .hasSize(classpath.size()).containsAll(classpath);
.hasSize(jvmOptions.size()).containsAll(jvmOptions); softly.assertThat(op.jvmOptions()).as("jvmOptions")
assertThat(op.optIn()).as("optIn") .hasSize(jvmOptions.size()).containsAll(jvmOptions);
.hasSize(optIn.size()).containsAll(optIn); softly.assertThat(op.optIn()).as("optIn")
assertThat(op.options()).as("options") .hasSize(optIn.size()).containsAll(optIn);
.hasSize(options.size()).containsAll(options); softly.assertThat(op.options()).as("options")
assertThat(op.plugin()).as("plugin") .hasSize(options.size()).containsAll(options);
.hasSize(plugin.size()).containsAll(plugin); softly.assertThat(op.plugin()).as("plugin")
assertThat(op.scriptTemplates()).as("scriptTemplates") .hasSize(plugin.size()).containsAll(plugin);
.hasSize(scriptTemplates.size()).containsAll(scriptTemplates); softly.assertThat(op.scriptTemplates()).as("scriptTemplates")
.hasSize(scriptTemplates.size()).containsAll(scriptTemplates);
}
var matches = List.of( var matches = List.of(
'@' + localPath("arg1.txt"), '@' + localPath("arg2.txt"), '@' + localPath("arg1.txt"), '@' + localPath("arg2.txt"),
@ -164,16 +169,18 @@ class CompileOptionsTest {
"-P", "plugin:id:name:value", "-P", "plugin:id:name:value",
"-P", "plugin:id2:name2:value2"); "-P", "plugin:id2:name2:value2");
var args = op.args(); try (var softly = new AutoCloseableSoftAssertions()) {
for (var arg : args) { var args = op.args();
var found = false; for (var arg : args) {
for (var match : matches) { var found = false;
if (match.equals(arg)) { for (var match : matches) {
found = true; if (match.equals(arg)) {
break; found = true;
break;
}
} }
softly.assertThat(found).as(arg + " not found.").isTrue();
} }
assertThat(found).as(arg + " not found.").isTrue();
} }
} }
@ -229,15 +236,17 @@ class CompileOptionsTest {
.verbose(true) .verbose(true)
.wError(true); .wError(true);
for (var p : args) { try (var softly = new AutoCloseableSoftAssertions()) {
var found = false; for (var p : args) {
for (var a : params.args()) { var found = false;
if (a.startsWith(p)) { for (var a : params.args()) {
found = true; if (a.startsWith(p)) {
break; found = true;
break;
}
} }
softly.assertThat(found).as(p + " not found.").isTrue();
} }
assertThat(found).as(p + " not found.").isTrue();
} }
} }
@ -333,30 +342,32 @@ class CompileOptionsTest {
.verbose(true) .verbose(true)
.wError(true); .wError(true);
assertThat(options.advancedOptions()).containsExactly("xopt1", "xopt2"); try (var softly = new AutoCloseableSoftAssertions()) {
assertThat(options.apiVersion()).isEqualTo("11"); softly.assertThat(options.advancedOptions()).containsExactly("xopt1", "xopt2");
assertThat(options.argFile()).containsExactly(new File("args.txt")); softly.assertThat(options.apiVersion()).isEqualTo("11");
assertThat(options.classpath()).containsExactly(new File("classpath")); softly.assertThat(options.argFile()).containsExactly(new File("args.txt"));
assertThat(options.expression()).isEqualTo("expression"); softly.assertThat(options.classpath()).containsExactly(new File("classpath"));
assertThat(options.isIncludeRuntime()).isTrue(); softly.assertThat(options.expression()).isEqualTo("expression");
assertThat(options.isJavaParameters()).isTrue(); softly.assertThat(options.isIncludeRuntime()).isTrue();
assertThat(options.isNoJdk()).isTrue(); softly.assertThat(options.isJavaParameters()).isTrue();
assertThat(options.isNoReflect()).isTrue(); softly.assertThat(options.isNoJdk()).isTrue();
assertThat(options.isNoStdLib()).isTrue(); softly.assertThat(options.isNoReflect()).isTrue();
assertThat(options.isNoWarn()).isTrue(); softly.assertThat(options.isNoStdLib()).isTrue();
assertThat(options.isProgressive()).isTrue(); softly.assertThat(options.isNoWarn()).isTrue();
assertThat(options.isVerbose()).isTrue(); softly.assertThat(options.isProgressive()).isTrue();
assertThat(options.jdkHome()).isEqualTo(new File("jdk-home")); softly.assertThat(options.isVerbose()).isTrue();
assertThat(options.jdkRelease()).isEqualTo("22"); softly.assertThat(options.jdkHome()).isEqualTo(new File("jdk-home"));
assertThat(options.jvmTarget()).isEqualTo("9"); softly.assertThat(options.jdkRelease()).isEqualTo("22");
assertThat(options.kotlinHome()).isEqualTo(new File("kotlin-home")); softly.assertThat(options.jvmTarget()).isEqualTo("9");
assertThat(options.languageVersion()).isEqualTo("1.0"); softly.assertThat(options.kotlinHome()).isEqualTo(new File("kotlin-home"));
assertThat(options.moduleName()).isEqualTo("module"); softly.assertThat(options.languageVersion()).isEqualTo("1.0");
assertThat(options.optIn()).containsExactly("opt1", "opt2"); softly.assertThat(options.moduleName()).isEqualTo("module");
assertThat(options.options()).containsExactly("-foo", "-bar"); softly.assertThat(options.optIn()).containsExactly("opt1", "opt2");
assertThat(options.path()).isEqualTo(new File("path")); softly.assertThat(options.options()).containsExactly("-foo", "-bar");
assertThat(options.plugin()).containsExactly("id:name:value"); softly.assertThat(options.path()).isEqualTo(new File("path"));
assertThat(options.scriptTemplates()).containsExactly("name", "name2"); softly.assertThat(options.plugin()).containsExactly("id:name:value");
assertThat(options.isWError()).isTrue(); softly.assertThat(options.scriptTemplates()).containsExactly("name", "name2");
softly.assertThat(options.isWError()).isTrue();
}
} }
} }