public final class JkKotlinCompiler
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
compile(JkKotlinJvmCompileSpec compileSpec)
Actually compile the source files to the output directory.
|
java.nio.file.Path |
getStdLib() |
static JkKotlinCompiler |
ofDefault()
Creates a
JkKotlinCompiler based on the default kotlin compiler installed on the host machine. |
static JkKotlinCompiler |
ofKotlinHome() |
JkKotlinCompiler |
withFailOnError(boolean fail)
Creates a copy of this
JkKotlinCompiler but with the specified
failed-on-error parameter. |
public static JkKotlinCompiler ofDefault()
JkKotlinCompiler
based on the default kotlin compiler installed on the host machine.public static JkKotlinCompiler ofKotlinHome()
public java.nio.file.Path getStdLib()
public JkKotlinCompiler withFailOnError(boolean fail)
JkKotlinCompiler
but with the specified
failed-on-error parameter. If true
then
a compilation error will throw a IllegalStateException
.public boolean compile(JkKotlinJvmCompileSpec compileSpec)
false
if a compilation error occurred.java.lang.IllegalStateException
- if a compilation error occurred and the 'withFailOnError' flag is true
.