Interface NativeImageOptions
-
- All Superinterfaces:
org.gradle.api.Named
,NativeImageCompileOptions
,NativeImageRuntimeOptions
- All Known Implementing Classes:
BaseNativeImageOptions
,DeprecatedNativeImageOptions
public interface NativeImageOptions extends org.gradle.api.Named, NativeImageCompileOptions, NativeImageRuntimeOptions
Class that declares native image options. This object is a domain object which can be configured via the Gradle DSL. Multiple instances of this object can be created, in which case it means we have multiple native binaries. The DSL combines the compiler options (building a native binary) and the runtime options (executing a native binary).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
agent(org.gradle.api.Action<? super DeprecatedAgentOptions> spec)
default NativeImageCompileOptions
asCompileOptions()
Restricts this object to the list of options which are required for compilation.NativeImageOptions
buildArgs(java.lang.Iterable<?> buildArgs)
Adds arguments for the native-image invocation.NativeImageOptions
buildArgs(java.lang.Object... buildArgs)
Adds arguments for the native-image invocation.NativeImageOptions
classpath(java.lang.Object... paths)
Adds elements to the classpath for the native-image building.java.lang.String
getName()
org.gradle.api.provider.Property<java.lang.String>
getRequiredVersion()
Deprecated.deprecated without replacement.NativeImageOptions
jvmArgs(java.lang.Iterable<?> arguments)
Adds some arguments to use when launching the JVM for the native-image building process.NativeImageOptions
jvmArgs(java.lang.Object... arguments)
Adds some arguments to use when launching the JVM for the native-image building process.void
resources(org.gradle.api.Action<? super NativeResourcesOptions> spec)
NativeImageOptions
runtimeArgs(java.lang.Iterable<?> arguments)
Adds some arguments to use when launching the built image.NativeImageOptions
runtimeArgs(java.lang.Object... arguments)
Adds some arguments to use when launching the built image.NativeImageOptions
systemProperties(java.util.Map<java.lang.String,?> properties)
Adds some system properties to be used by the native-image builder process.NativeImageOptions
systemProperty(java.lang.String name, java.lang.Object value)
Adds a system property to be used by the native-image builder process.-
Methods inherited from interface org.graalvm.buildtools.gradle.dsl.NativeImageCompileOptions
getAgent, getBuildArgs, getClasspath, getConfigurationFileDirectories, getDebug, getEnvironmentVariables, getExcludeConfig, getExcludeConfigArgs, getFallback, getImageName, getJavaLauncher, getJvmArgs, getMainClass, getQuickBuild, getResources, getRichOutput, getSharedLibrary, getSystemProperties, getUseFatJar, getVerbose
-
Methods inherited from interface org.graalvm.buildtools.gradle.dsl.NativeImageRuntimeOptions
getRuntimeArgs
-
-
-
-
Method Detail
-
getName
@Internal java.lang.String getName()
- Specified by:
getName
in interfaceorg.gradle.api.Named
-
resources
void resources(org.gradle.api.Action<? super NativeResourcesOptions> spec)
-
buildArgs
NativeImageOptions buildArgs(java.lang.Object... buildArgs)
Adds arguments for the native-image invocation.- Parameters:
buildArgs
- Arguments for the native-image invocation.- Returns:
- this
-
buildArgs
NativeImageOptions buildArgs(java.lang.Iterable<?> buildArgs)
Adds arguments for the native-image invocation.- Parameters:
buildArgs
- Arguments for the native-image invocation.- Returns:
- this
-
systemProperties
NativeImageOptions systemProperties(java.util.Map<java.lang.String,?> properties)
Adds some system properties to be used by the native-image builder process.- Parameters:
properties
- The system properties. Must not be null.- Returns:
- this
-
systemProperty
NativeImageOptions systemProperty(java.lang.String name, java.lang.Object value)
Adds a system property to be used by the native-image builder process.- Parameters:
name
- The name of the propertyvalue
- The value for the property. May be null.- Returns:
- this
-
classpath
NativeImageOptions classpath(java.lang.Object... paths)
Adds elements to the classpath for the native-image building.- Parameters:
paths
- The classpath elements.- Returns:
- this
-
jvmArgs
NativeImageOptions jvmArgs(java.lang.Object... arguments)
Adds some arguments to use when launching the JVM for the native-image building process.- Parameters:
arguments
- The arguments.- Returns:
- this
-
jvmArgs
NativeImageOptions jvmArgs(java.lang.Iterable<?> arguments)
Adds some arguments to use when launching the JVM for the native-image building process.- Parameters:
arguments
- The arguments. Must not be null.- Returns:
- this
-
runtimeArgs
NativeImageOptions runtimeArgs(java.lang.Object... arguments)
Adds some arguments to use when launching the built image.- Parameters:
arguments
- The arguments.- Returns:
- this
-
runtimeArgs
NativeImageOptions runtimeArgs(java.lang.Iterable<?> arguments)
Adds some arguments to use when launching the built image.- Parameters:
arguments
- The arguments. Must not be null.- Returns:
- this
-
agent
void agent(org.gradle.api.Action<? super DeprecatedAgentOptions> spec)
-
getRequiredVersion
@Input @Optional @Deprecated org.gradle.api.provider.Property<java.lang.String> getRequiredVersion()
Deprecated.deprecated without replacement.Specify the minimal GraalVM version, can beMAJOR
,MAJOR.MINOR
orMAJOR.MINOR.PATCH
.- Returns:
- the required version property.
-
asCompileOptions
default NativeImageCompileOptions asCompileOptions()
Restricts this object to the list of options which are required for compilation. This is required so that Gradle only considers the inputs from that type instead of the full set of properties when building a native binary.- Returns:
- the compilation options.
-
-