public final class JkKotlinCompileSpec
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENCODING_OPTS |
static java.lang.String |
PROCESSOR_OPTS |
static java.lang.String |
SOURCE_OPTS |
static java.lang.String |
TARGET_OPTS |
Modifier and Type | Method and Description |
---|---|
JkKotlinCompileSpec |
addOptions(java.lang.Iterable<java.lang.String> options)
|
JkKotlinCompileSpec |
addOptions(java.lang.String... options)
Adds specified options to pass to the compileRunner.
|
JkKotlinCompileSpec |
addSources(java.lang.Iterable<java.nio.file.Path> paths)
Adds specified source files to the set of java sources to compile.
|
JkKotlinCompileSpec |
addSources(JkPathTree tree) |
JkKotlinCompileSpec |
addSources(JkPathTreeSet treeSet) |
JkKotlinCompileSpec |
addSources(java.nio.file.Path path1,
java.nio.file.Path path2,
java.nio.file.Path... files) |
JkKotlinCompileSpec |
copy() |
JkKotlinCompileSpec |
disableAnnotationProcessing()
Disable annotation processing.
|
java.lang.String |
getEncoding() |
java.lang.String |
getNextValue(java.lang.String optionName) |
java.util.List<java.lang.String> |
getOptions()
Returns the specifications as a list of string directly usable in the
JkJavaCompiler except
sourcepath |
java.nio.file.Path |
getOutputDir() |
java.util.List<java.nio.file.Path> |
getSourceFiles()
Returns all source files to be compiled.
|
JkJavaVersion |
getTargetVersion() |
static JkKotlinCompileSpec |
of() |
JkKotlinCompileSpec |
setAnnotationProcessingOnly()
Only process annotation.
|
JkKotlinCompileSpec |
setAnnotationProcessors(java.lang.String... annotationProcessorClassNames)
Sets specified annotation classes instead of using the ones discovered by default Java 6 mechanism.
|
JkKotlinCompileSpec |
setClasspath(java.lang.Iterable<java.nio.file.Path> files)
Creates a copy of this
JkJavaCompiler but with the specified
classpath. |
JkKotlinCompileSpec |
setEncoding(java.lang.String encoding)
Creates a copy of this
JkKotlinCompileSpec but using the
specified source encoding (e.g. |
JkKotlinCompileSpec |
setOption(java.lang.String optionName,
java.lang.String optionValue)
Some options of a compileRunner are set in a couple of name/value (version, classpath, .....).
|
JkKotlinCompileSpec |
setOutputDir(java.nio.file.Path outputDir) |
JkKotlinCompileSpec |
setTargetVersion(JkJavaVersion version)
Sets the target Java version for compiled classes.
|
public static final java.lang.String SOURCE_OPTS
public static final java.lang.String TARGET_OPTS
public static final java.lang.String PROCESSOR_OPTS
public static final java.lang.String ENCODING_OPTS
public static JkKotlinCompileSpec of()
public JkKotlinCompileSpec copy()
public java.util.List<java.lang.String> getOptions()
JkJavaCompiler
except
sourcepathpublic java.nio.file.Path getOutputDir()
public JkKotlinCompileSpec setOutputDir(java.nio.file.Path outputDir)
public JkJavaVersion getTargetVersion()
public JkKotlinCompileSpec setTargetVersion(JkJavaVersion version)
JkJavaCompiler
can choose to use the appropriate compileRunner to compile to the
specified target.public java.lang.String getEncoding()
public JkKotlinCompileSpec setEncoding(java.lang.String encoding)
JkKotlinCompileSpec
but using the
specified source encoding (e.g. UTF-8). If null
is specified,
then default plateform encoding will be used.public JkKotlinCompileSpec addSources(java.lang.Iterable<java.nio.file.Path> paths)
public JkKotlinCompileSpec addSources(JkPathTree tree)
public JkKotlinCompileSpec addSources(JkPathTreeSet treeSet)
public JkKotlinCompileSpec addSources(java.nio.file.Path path1, java.nio.file.Path path2, java.nio.file.Path... files)
addSources(Iterable)
public java.util.List<java.nio.file.Path> getSourceFiles()
public JkKotlinCompileSpec setClasspath(java.lang.Iterable<java.nio.file.Path> files)
JkJavaCompiler
but with the specified
classpath.public JkKotlinCompileSpec addOptions(java.lang.String... options)
javac -deprecation -cp path1 path2
, you should pass "-deprecation",
"-cp", "path1", "path2" parameters.public JkKotlinCompileSpec addOptions(java.lang.Iterable<java.lang.String> options)
public JkKotlinCompileSpec setOption(java.lang.String optionName, java.lang.String optionValue)
public JkKotlinCompileSpec setAnnotationProcessors(java.lang.String... annotationProcessorClassNames)
public JkKotlinCompileSpec disableAnnotationProcessing()
public JkKotlinCompileSpec setAnnotationProcessingOnly()
public java.lang.String getNextValue(java.lang.String optionName)