Interface NativeImageOptions
- All Superinterfaces:
org.gradle.api.Named
,NativeImageCompileOptions
,NativeImageRuntimeOptions
- All Known Implementing Classes:
BaseNativeImageOptions
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).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
agent
(org.gradle.api.Action<? super DeprecatedAgentOptions> spec) default NativeImageCompileOptions
Restricts this object to the list of options which are required for compilation.Adds arguments for the native-image invocation.Adds arguments for the native-image invocation.Adds elements to the classpath for the native-image building.getName()
org.gradle.api.provider.Property<String>
Deprecated.deprecated without replacement.Adds some arguments to use when launching the JVM for the native-image building process.Adds some arguments to use when launching the JVM for the native-image building process.void
resources
(org.gradle.api.Action<? super NativeResourcesOptions> spec) runtimeArgs
(Iterable<?> arguments) Adds some arguments to use when launching the built image.runtimeArgs
(Object... arguments) Adds some arguments to use when launching the built image.systemProperties
(Map<String, ?> properties) Adds some system properties to be used by the native-image builder process.systemProperty
(String name, 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
createLayer, externalDependenciesOf, externalDependenciesOf, getAgent, getBuildArgs, getClasspath, getConfigurationFileDirectories, getDebug, getEnvironmentVariables, getExcludeConfig, getExcludeConfigArgs, getFallback, getImageName, getJavaLauncher, getJvmArgs, getLayers, getMainClass, getPgoInstrument, getPgoProfilesDirectory, getQuickBuild, getResources, getRichOutput, getSharedLibrary, getSystemProperties, getUseFatJar, getVerbose, layers, useLayer
Methods inherited from interface org.graalvm.buildtools.gradle.dsl.NativeImageRuntimeOptions
getRuntimeArgs
-
Method Details
-
getName
- Specified by:
getName
in interfaceorg.gradle.api.Named
-
resources
-
buildArgs
Adds arguments for the native-image invocation.- Parameters:
buildArgs
- Arguments for the native-image invocation.- Returns:
- this
-
buildArgs
Adds arguments for the native-image invocation.- Parameters:
buildArgs
- Arguments for the native-image invocation.- Returns:
- this
-
systemProperties
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
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
Adds elements to the classpath for the native-image building.- Parameters:
paths
- The classpath elements.- Returns:
- this
-
jvmArgs
Adds some arguments to use when launching the JVM for the native-image building process.- Parameters:
arguments
- The arguments.- Returns:
- this
-
jvmArgs
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
Adds some arguments to use when launching the built image.- Parameters:
arguments
- The arguments.- Returns:
- this
-
runtimeArgs
Adds some arguments to use when launching the built image.- Parameters:
arguments
- The arguments. Must not be null.- Returns:
- this
-
agent
-
getRequiredVersion
Deprecated.deprecated without replacement.Specify the minimal GraalVM version, can beMAJOR
,MAJOR.MINOR
orMAJOR.MINOR.PATCH
.- Returns:
- the required version property.
-
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.
-