Package org.gradle.api.tasks.compile
Class ForkOptions
- java.lang.Object
-
- org.gradle.api.tasks.compile.AbstractOptions
-
- org.gradle.api.tasks.compile.BaseForkOptions
-
- org.gradle.api.tasks.compile.ForkOptions
-
- All Implemented Interfaces:
Serializable
public class ForkOptions extends BaseForkOptions
Fork options for Java compilation. Only take effect ifCompileOptions.forkistrue.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ForkOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanexcludeFromAntProperties(String fieldName)StringgetExecutable()Returns the compiler executable to be used.FilegetJavaHome()Returns the Java home which contains the compiler to use.StringgetTempDir()Returns the directory used for temporary files that may be created to pass command line arguments to the compiler process.voidsetExecutable(String executable)Sets the compiler executable to be used.voidsetJavaHome(File javaHome)Sets the Java home which contains the compiler to use.voidsetTempDir(String tempDir)Sets the directory used for temporary files that may be created to pass command line arguments to the compiler process.-
Methods inherited from class org.gradle.api.tasks.compile.BaseForkOptions
getJvmArgs, getMemoryInitialSize, getMemoryMaximumSize, setJvmArgs, setMemoryInitialSize, setMemoryMaximumSize
-
Methods inherited from class org.gradle.api.tasks.compile.AbstractOptions
define, getAntPropertyName, getAntPropertyValue, optionMap
-
-
-
-
Method Detail
-
getExecutable
@Nullable @Optional @Input public String getExecutable()
Returns the compiler executable to be used. If set, a new compiler process will be forked for every compile task. Defaults tonull.Setting the executable disables task output caching.
-
setExecutable
public void setExecutable(@Nullable String executable)
Sets the compiler executable to be used. If set, a new compiler process will be forked for every compile task. Defaults tonull.Setting the executable disables task output caching.
-
getJavaHome
@Internal @Nullable public File getJavaHome()
Returns the Java home which contains the compiler to use. If set, a new compiler process will be forked for every compile task. Defaults tonull.- Since:
- 3.5
-
setJavaHome
public void setJavaHome(@Nullable File javaHome)
Sets the Java home which contains the compiler to use. If set, a new compiler process will be forked for every compile task. Defaults tonull.- Since:
- 3.5
-
getTempDir
@Internal @Nullable public String getTempDir()
Returns the directory used for temporary files that may be created to pass command line arguments to the compiler process. Defaults tonull, in which case the directory will be chosen automatically.
-
setTempDir
public void setTempDir(@Nullable String tempDir)
Sets the directory used for temporary files that may be created to pass command line arguments to the compiler process. Defaults tonull, in which case the directory will be chosen automatically.
-
excludeFromAntProperties
protected boolean excludeFromAntProperties(String fieldName)
- Overrides:
excludeFromAntPropertiesin classBaseForkOptions
-
-