public class NativeImageTask extends org.gradle.api.tasks.AbstractExecTask<NativeImageTask> implements NativeImageOptions
| Constructor and Description |
|---|
NativeImageTask()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
NativeImageOptions |
classpath(java.lang.Object... paths)
Adds elements to the classpath for executing the main class.
|
void |
configure()
Configure the task.
|
NativeImageOptions |
debug(boolean debug)
Builds a native image with debug symbols
|
NativeImageOptions |
enableServerBuild(boolean enabled)
Enables server build.
|
protected void |
exec() |
NativeImageOptions |
fallback(boolean fallback)
Sets whether to enable a fallback or not
|
org.gradle.api.file.FileCollection |
getClasspath()
Returns the classpath for executing the main class.
|
org.gradle.api.provider.Property<java.lang.String> |
getImageName()
Gets the name of the native executable to be generated.
|
org.gradle.api.provider.ListProperty<java.lang.String> |
getJvmArgs()
Returns the extra arguments to use to launch the JVM for the process.
|
org.gradle.api.provider.Property<java.lang.String> |
getMain()
Returns the fully qualified name of the Main class to be executed.
|
java.io.File |
getNativeImageOutput() |
protected org.gradle.api.model.ObjectFactory |
getObjectFactory() |
org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Object> |
getSystemProperties()
Returns the system properties which will be used for the process.
|
org.gradle.api.provider.Property<java.lang.Boolean> |
isDebug() |
org.gradle.api.provider.Property<java.lang.Boolean> |
isFallback() |
org.gradle.api.provider.Property<java.lang.Boolean> |
isServerBuild() |
org.gradle.api.provider.Property<java.lang.Boolean> |
isVerbose() |
NativeImageOptions |
jvmArgs(java.lang.Iterable<?> arguments)
Adds some arguments to use to launch the JVM for the process.
|
NativeImageOptions |
jvmArgs(java.lang.Object... arguments)
Adds some arguments to use to launch the JVM for the process.
|
NativeImageOptions |
setClasspath(org.gradle.api.file.FileCollection classpath)
Sets the classpath for executing the main class.
|
NativeImageOptions |
setImageName(java.lang.String name)
Sets the name of the native executable to be generated.
|
void |
setJvmArgs(java.lang.Iterable<?> arguments)
Sets the extra arguments to use to launch the JVM for the process.
|
void |
setJvmArgs(java.util.List<java.lang.String> arguments)
Sets the extra arguments to use to launch the JVM for the process.
|
NativeImageOptions |
setMain(java.lang.String main)
Sets the fully qualified name of the main class to be executed.
|
void |
setSystemProperties(java.util.Map<java.lang.String,?> properties)
Sets the system properties to use for the process.
|
NativeImageOptions |
systemProperties(java.util.Map<java.lang.String,?> properties)
Adds some system properties to use for the process.
|
NativeImageOptions |
systemProperty(java.lang.String name,
java.lang.Object value)
Adds a system property to use for the process.
|
NativeImageOptions |
verbose(boolean verbose)
Sets the native image build to be verbose
|
args, args, commandLine, commandLine, copyTo, environment, environment, executable, getArgs, getArgumentProviders, getCommandLine, getEnvironment, getErrorOutput, getExecActionFactory, getExecResult, getExecutable, getExecutionResult, getStandardInput, getStandardOutput, getWorkingDir, isIgnoreExitValue, setArgs, setArgs, setCommandLine, setCommandLine, setCommandLine, setEnvironment, setErrorOutput, setExecutable, setExecutable, setIgnoreExitValue, setStandardInput, setStandardOutput, setWorkingDir, setWorkingDir, workingDirconventionMapping, conventionMapping, getConventionMappingappendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getRequiredServices, getServices, getSharedResources, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitargs, args, setArgs, setArgspublic org.gradle.api.provider.Property<java.lang.Boolean> isFallback()
isFallback in interface NativeImageOptions@Inject protected org.gradle.api.model.ObjectFactory getObjectFactory()
getObjectFactory in class org.gradle.api.tasks.AbstractExecTask<NativeImageTask>@OutputFile public java.io.File getNativeImageOutput()
protected void exec()
exec in class org.gradle.api.tasks.AbstractExecTask<NativeImageTask>public void configure()
public org.gradle.api.provider.Property<java.lang.String> getImageName()
NativeImageOptionsgetImageName in interface NativeImageOptionspublic NativeImageOptions setImageName(@Nullable java.lang.String name)
NativeImageOptionssetImageName in interface NativeImageOptionsname - The name.public org.gradle.api.provider.Property<java.lang.String> getMain()
NativeImageOptions
This does not need to be set if using an Executable Jar with a Main-Class attribute.
getMain in interface NativeImageOptionspublic NativeImageOptions setMain(java.lang.String main)
NativeImageOptionssetMain in interface NativeImageOptionsmain - the fully qualified name of the main class to be executed.public org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Object> getSystemProperties()
NativeImageOptionsgetSystemProperties in interface NativeImageOptionspublic void setSystemProperties(java.util.Map<java.lang.String,?> properties)
NativeImageOptionssetSystemProperties in interface NativeImageOptionsproperties - The system properties. Must not be null.public NativeImageOptions systemProperties(java.util.Map<java.lang.String,?> properties)
NativeImageOptionssystemProperties in interface NativeImageOptionsproperties - The system properties. Must not be null.public NativeImageOptions systemProperty(java.lang.String name, java.lang.Object value)
NativeImageOptionssystemProperty in interface NativeImageOptionsname - The name of the propertyvalue - The value for the property. May be null.public NativeImageOptions classpath(java.lang.Object... paths)
NativeImageOptionsclasspath in interface NativeImageOptionspaths - classpath elementspublic org.gradle.api.file.FileCollection getClasspath()
NativeImageOptionsgetClasspath in interface NativeImageOptionspublic NativeImageOptions setClasspath(org.gradle.api.file.FileCollection classpath)
NativeImageOptionssetClasspath in interface NativeImageOptionsclasspath - the classpathpublic org.gradle.api.provider.ListProperty<java.lang.String> getJvmArgs()
NativeImageOptionsgetJvmArgs in interface NativeImageOptionspublic void setJvmArgs(@Nullable
java.util.List<java.lang.String> arguments)
NativeImageOptionssetJvmArgs in interface NativeImageOptionsarguments - The arguments. Must not be null.public void setJvmArgs(@Nullable
java.lang.Iterable<?> arguments)
NativeImageOptionssetJvmArgs in interface NativeImageOptionsarguments - The arguments. Must not be null.public NativeImageOptions jvmArgs(java.lang.Iterable<?> arguments)
NativeImageOptionsjvmArgs in interface NativeImageOptionsarguments - The arguments. Must not be null.public NativeImageOptions jvmArgs(java.lang.Object... arguments)
NativeImageOptionsjvmArgs in interface NativeImageOptionsarguments - The arguments.public NativeImageOptions verbose(boolean verbose)
NativeImageOptionsverbose in interface NativeImageOptionspublic NativeImageOptions enableServerBuild(boolean enabled)
NativeImageOptionsenableServerBuild in interface NativeImageOptionspublic NativeImageOptions debug(boolean debug)
NativeImageOptionsdebug in interface NativeImageOptionspublic NativeImageOptions fallback(boolean fallback)
NativeImageOptionsfallback in interface NativeImageOptionspublic org.gradle.api.provider.Property<java.lang.Boolean> isDebug()
isDebug in interface NativeImageOptionspublic org.gradle.api.provider.Property<java.lang.Boolean> isVerbose()
isVerbose in interface NativeImageOptionspublic org.gradle.api.provider.Property<java.lang.Boolean> isServerBuild()
isServerBuild in interface NativeImageOptions