Pass arguments to kotlinc via @argfile
This commit is contained in:
parent
125e9f7327
commit
b0d6a3ac3b
4 changed files with 59 additions and 33 deletions
|
@ -224,8 +224,8 @@ class CompileKotlinOperationTest {
|
|||
var examples = new File("examples");
|
||||
var op = new CompileKotlinOperation().fromProject(
|
||||
new BaseProjectBlueprint(examples, "com.example", "examples", "examples"));
|
||||
assertThat(op.mainSourceDirectories()).contains(new File(examples, "src/main/kotlin"));
|
||||
assertThat(op.testSourceDirectories()).contains(new File(examples, "src/test/kotlin"));
|
||||
assertThat(op.mainSourceDirectories()).containsExactly(new File(examples, "src/main/kotlin"));
|
||||
assertThat(op.testSourceDirectories()).containsExactly(new File(examples, "src/test/kotlin"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -51,7 +51,6 @@ class CompileOptionsTest {
|
|||
var options = new CompileOptions()
|
||||
.apiVersion("11")
|
||||
.argFile(new File("file.txt"), new File("file2.txt"))
|
||||
.classpath(new File("path1"), new File("path2"))
|
||||
.javaParameters(true)
|
||||
.jvmTarget("11")
|
||||
.includeRuntime(true)
|
||||
|
@ -76,7 +75,6 @@ class CompileOptionsTest {
|
|||
var matches = List.of(
|
||||
"-api-version", "11",
|
||||
"@" + localPath("file.txt"), "@" + localPath("file2.txt"),
|
||||
"-classpath", localPath("path1", "path2"),
|
||||
"-java-parameters",
|
||||
"-jvm-target", "11",
|
||||
"-include-runtime",
|
||||
|
@ -210,7 +208,6 @@ class CompileOptionsTest {
|
|||
.advancedOptions("Xoption")
|
||||
.apiVersion("11")
|
||||
.argFile("file")
|
||||
.classpath("classpath")
|
||||
.expression("expression")
|
||||
.includeRuntime(true)
|
||||
.javaParameters(true)
|
||||
|
@ -233,6 +230,10 @@ class CompileOptionsTest {
|
|||
.wError(true)
|
||||
.wExtra(true);
|
||||
|
||||
var skipArgs = List.of("-J", "-classpath");
|
||||
assertThat(args).as(skipArgs + " not found.").containsAll(skipArgs);
|
||||
args.removeAll(skipArgs);
|
||||
|
||||
try (var softly = new AutoCloseableSoftAssertions()) {
|
||||
for (var p : args) {
|
||||
var found = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue