Only check kotlinc arguments on Linux
This commit is contained in:
parent
dc5b81e366
commit
0990e82f04
3 changed files with 12 additions and 5 deletions
|
@ -23,6 +23,7 @@ import rife.bld.publish.PublishLicense;
|
|||
import rife.bld.publish.PublishScm;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import static rife.bld.dependencies.Repository.*;
|
||||
import static rife.bld.dependencies.Scope.compile;
|
||||
|
@ -97,10 +98,13 @@ public class CompileKotlinOperationBuild extends Project {
|
|||
|
||||
@Override
|
||||
public void test() throws Exception {
|
||||
new ExecOperation()
|
||||
.fromProject(this)
|
||||
.command("scripts/cliargs.sh")
|
||||
.execute();
|
||||
var os = System.getProperty("os.name");
|
||||
if (os != null && os.toLowerCase(Locale.US).contains("linux")) {
|
||||
new ExecOperation()
|
||||
.fromProject(this)
|
||||
.command("scripts/cliargs.sh")
|
||||
.execute();
|
||||
}
|
||||
super.test();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
|
|||
* @since 1.1.0
|
||||
*/
|
||||
public static boolean isMacOS() {
|
||||
return OS_NAME != null && (OS_NAME.contains("mac") || OS_NAME.contains("darwin"));
|
||||
return OS_NAME != null && (OS_NAME.contains("mac") || OS_NAME.contains("darwin") || OS_NAME.contains("osx"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,6 +18,8 @@ package rife.bld.extension.kotlin;
|
|||
|
||||
import org.assertj.core.api.AutoCloseableSoftAssertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledOnOs;
|
||||
import org.junit.jupiter.api.condition.OS;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -199,6 +201,7 @@ class CompileOptionsTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@EnabledOnOs(OS.LINUX)
|
||||
void testCheckAllParams() throws IOException {
|
||||
var args = Files.readAllLines(Paths.get("src", "test", "resources", "kotlinc-args.txt"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue