Class GosuCompileOptions
- java.lang.Object
-
- org.gradle.api.tasks.compile.AbstractOptions
-
- org.gosulang.gradle.tasks.compile.GosuCompileOptions
-
- All Implemented Interfaces:
java.io.Serializable
public class GosuCompileOptions extends org.gradle.api.tasks.compile.AbstractOptions- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GosuCompileOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDependencyFile()org.gradle.api.tasks.compile.BaseForkOptionsgetForkOptions()java.lang.IntegergetMaxErrs()java.lang.IntegergetMaxWarns()booleanisCheckedArithmetic()booleanisFailOnError()Tells whether the compilation task should fail if compile errors occurred.booleanisFork()booleanisIncrementalCompilation()booleanisVerbose()voidsetCheckedArithmetic(boolean checkedArithmetic)If true, Gosu classes will be compiled with-DcheckedArithmetic=true.voidsetDependencyFile(java.lang.String dependencyFile)Sets the path to the dependency tracking file for incremental compilation.voidsetFailOnError(boolean failOnError)Sets whether the compilation task should fail if compile errors occurred.voidsetFork(boolean fork)voidsetForkOptions(org.gradle.api.tasks.compile.BaseForkOptions forkOptions)voidsetIncrementalCompilation(boolean incrementalCompilation)Sets whether incremental compilation is enabled.voidsetMaxErrs(int maxerrs)voidsetMaxWarns(int maxwarns)voidsetVerbose(boolean verbose)Sets whether the compilation task should use verbose logging.
-
-
-
Method Detail
-
isFailOnError
@Input public boolean isFailOnError()
Tells whether the compilation task should fail if compile errors occurred. Defaults totrue.- Returns:
- the failOnError property
-
setFailOnError
public void setFailOnError(boolean failOnError)
Sets whether the compilation task should fail if compile errors occurred. Defaults totrue.- Parameters:
failOnError- Fail the compilation task if compile errors occur
-
isFork
@Input public boolean isFork()
- Returns:
- Whether to run the Gosu compiler in a separate process. Defaults to
true.
-
setFork
public void setFork(boolean fork)
- Parameters:
fork- Sets whether to run the Gosu compiler in a separate process. Defaults totrue.
-
getForkOptions
public org.gradle.api.tasks.compile.BaseForkOptions getForkOptions()
- Returns:
- options for running the Gosu compiler in a separate process. These options only take effect
if
forkis set totrue.
-
setForkOptions
public void setForkOptions(org.gradle.api.tasks.compile.BaseForkOptions forkOptions)
- Parameters:
forkOptions- Set these options for running the Gosu compiler in a separate process. These options only take effect ifforkis set totrue.
-
isCheckedArithmetic
@Input public boolean isCheckedArithmetic()
- Returns:
- Whether compilation with checked arithmetic operations is enabled or not.
-
setCheckedArithmetic
public void setCheckedArithmetic(boolean checkedArithmetic)
If true, Gosu classes will be compiled with-DcheckedArithmetic=true. Defaults tofalse.- Parameters:
checkedArithmetic- Whether to compile with checked arithmetic
-
setVerbose
public void setVerbose(boolean verbose)
Sets whether the compilation task should use verbose logging. Defaults tofalse.- Parameters:
verbose- Use verbose logging
-
isVerbose
@Console public boolean isVerbose()
- Returns:
- Whether to use verbose logging. Defaults to
false.
-
setMaxWarns
public void setMaxWarns(int maxwarns)
-
getMaxWarns
@Input @Optional public java.lang.Integer getMaxWarns()
- Returns:
- Max error threshold, if specified. May be null.
-
setMaxErrs
public void setMaxErrs(int maxerrs)
-
getMaxErrs
@Input @Optional public java.lang.Integer getMaxErrs()
- Returns:
- Max error threshold, if specified. May be null.
-
isIncrementalCompilation
@Input public boolean isIncrementalCompilation()
- Returns:
- Whether incremental compilation is enabled. Defaults to
false.
-
setIncrementalCompilation
public void setIncrementalCompilation(boolean incrementalCompilation)
Sets whether incremental compilation is enabled. Defaults tofalse. When enabled, the compiler will track dependencies and only recompile affected files. Requires Gosu 1.18.7 or later.- Parameters:
incrementalCompilation- Enable incremental compilation
-
getDependencyFile
@Input @Optional public java.lang.String getDependencyFile()
- Returns:
- Path to the dependency tracking file for incremental compilation. May be null. If not specified, defaults to "build/tmp/gosuc-deps.json".
-
setDependencyFile
public void setDependencyFile(java.lang.String dependencyFile)
Sets the path to the dependency tracking file for incremental compilation. The path can be absolute or relative to the project directory. If not specified, defaults to "build/tmp/gosuc-deps.json". Only used when incrementalCompilation is true.- Parameters:
dependencyFile- Path to the dependency tracking file
-
-