Added no-stdlib and -Xfriend-paths compile options

This commit is contained in:
Erik C. Thauvin 2023-11-08 22:12:34 -08:00
parent 04fd7fe037
commit 51d046a2f7
4 changed files with 31 additions and 5 deletions

View file

@ -45,6 +45,7 @@ public class CompileKotlinOptions {
private String moduleName_;
private boolean noJdk_;
private boolean noReflect_;
private boolean noStdLib_ = true;
private boolean noWarn_;
private String path_;
private boolean progressive_;
@ -177,6 +178,11 @@ public class CompileKotlinOptions {
args.add("-no-reflect");
}
// no-std-lib
if (noStdLib_) {
args.add("-no-stdlib");
}
// no-warn
if (noWarn_) {
args.add("-no-warn");
@ -398,6 +404,18 @@ public class CompileKotlinOptions {
return this;
}
/**
* Don't automatically include the Kotlin/JVM stdlib ({@code kotlin-stdlib.jar}) and Kotlin reflection
* ({@code kotlin-reflect.jar}) into the classpath.
*
* @param noStdLib {@code true} or {@code false}
* @return this class instance
*/
public CompileKotlinOptions noStdLib(boolean noStdLib) {
noStdLib_ = noStdLib;
return this;
}
/**
* Suppress the compiler from displaying warnings during compilation.
*