Class BaseNativeImageOptions
java.lang.Object
org.graalvm.buildtools.gradle.internal.BaseNativeImageOptions
- All Implemented Interfaces:
 NativeImageCompileOptions,NativeImageOptions,NativeImageRuntimeOptions,org.gradle.api.Named
Class that declares native image options.
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer - 
Constructor Summary
ConstructorsConstructorDescriptionBaseNativeImageOptions(String name, org.gradle.api.file.ProjectLayout layout, org.gradle.api.model.ObjectFactory objectFactory, org.gradle.api.provider.ProviderFactory providers, org.gradle.jvm.toolchain.JavaToolchainService toolchains, org.gradle.api.tasks.TaskContainer tasks, String defaultImageName)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidagent(org.gradle.api.Action<? super DeprecatedAgentOptions> spec) Adds arguments for the native-image invocation.Adds arguments for the native-image invocation.Adds elements to the classpath for the native-image building.voidcreateLayer(org.gradle.api.Action<? super CreateLayerOptions> spec) abstract DeprecatedAgentOptionsgetAgent()abstract org.gradle.api.provider.ListProperty<String>Returns the arguments for the native-image invocation.abstract org.gradle.api.file.ConfigurableFileCollectionReturns the classpath for the native-image building.abstract org.gradle.api.file.ConfigurableFileCollectionReturns the list of configuration file directories (e.g.abstract org.gradle.api.provider.Property<Boolean>getDebug()Gets the value which toggles native-image debug symbol output.Returns the environment variables which will be used by the native-image builder process.Returns the MapProperty that contains information about configuration that should be excluded during image building.abstract org.gradle.api.provider.Property<Boolean>abstract org.gradle.api.provider.Property<String>Gets the name of the native executable to be generated.abstract org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher>Returns the toolchain used to invoke native-image.abstract org.gradle.api.provider.ListProperty<String>Returns the extra arguments to use when launching the JVM for the native-image building process.org.gradle.api.DomainObjectSet<LayerOptions>abstract org.gradle.api.provider.Property<String>Returns the fully qualified name of the Main class to be executed.getName()abstract org.gradle.api.provider.Property<Boolean>Gets the value which determines if image is being built in quick build mode.abstract NativeResourcesOptionsabstract org.gradle.api.provider.Property<Boolean>Gets the value which determines if image is being built with rich output.abstract org.gradle.api.provider.ListProperty<String>Returns the arguments to use when launching the built image.abstract org.gradle.api.provider.Property<Boolean>Gets the value which determines if shared library is being built.Returns the system properties which will be used by the native-image builder process.abstract org.gradle.api.provider.Property<Boolean>Gets the value which toggles native-image verbose output.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.voidlayers(org.gradle.api.Action<? super org.gradle.api.DomainObjectSet<LayerOptions>> spec) voidresources(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.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graalvm.buildtools.gradle.dsl.NativeImageCompileOptions
externalDependenciesOf, externalDependenciesOf, getExcludeConfigArgs, getPgoInstrument, getPgoProfilesDirectory, getUseFatJarMethods inherited from interface org.graalvm.buildtools.gradle.dsl.NativeImageOptions
asCompileOptions, getRequiredVersion 
- 
Constructor Details
- 
BaseNativeImageOptions
@Inject public BaseNativeImageOptions(String name, org.gradle.api.file.ProjectLayout layout, org.gradle.api.model.ObjectFactory objectFactory, org.gradle.api.provider.ProviderFactory providers, org.gradle.jvm.toolchain.JavaToolchainService toolchains, org.gradle.api.tasks.TaskContainer tasks, String defaultImageName)  
 - 
 - 
Method Details
- 
getName
- Specified by:
 getNamein interfaceorg.gradle.api.Named- Specified by:
 getNamein interfaceNativeImageOptions
 - 
getImageName
Gets the name of the native executable to be generated.- Specified by:
 getImageNamein interfaceNativeImageCompileOptions- Returns:
 - The image name property.
 
 - 
getMainClass
Returns the fully qualified name of the Main class to be executed.This does not need to be set if using an Executable Jar with a
Main-Classattribute.- Specified by:
 getMainClassin interfaceNativeImageCompileOptions- Returns:
 - mainClass The main class.
 
 - 
getBuildArgs
Returns the arguments for the native-image invocation.- Specified by:
 getBuildArgsin interfaceNativeImageCompileOptions- Returns:
 - Arguments for the native-image invocation.
 
 - 
getSystemProperties
Returns the system properties which will be used by the native-image builder process.- Specified by:
 getSystemPropertiesin interfaceNativeImageCompileOptions- Returns:
 - The system properties. Returns an empty map when there are no system properties.
 
 - 
getEnvironmentVariables
Returns the environment variables which will be used by the native-image builder process.- Specified by:
 getEnvironmentVariablesin interfaceNativeImageCompileOptions- Returns:
 - the environment variables. Returns an empty map when there are no environment variables.
 - Since:
 - 0.9.14
 
 - 
getClasspath
@InputFiles @Classpath public abstract org.gradle.api.file.ConfigurableFileCollection getClasspath()Returns the classpath for the native-image building.- Specified by:
 getClasspathin interfaceNativeImageCompileOptions- Returns:
 - classpath The classpath for the native-image building.
 
 - 
getJvmArgs
Returns the extra arguments to use when launching the JVM for the native-image building process. Does not include system properties and the minimum/maximum heap size.- Specified by:
 getJvmArgsin interfaceNativeImageCompileOptions- Returns:
 - The arguments. Returns an empty list if there are no arguments.
 
 - 
getRuntimeArgs
Returns the arguments to use when launching the built image.- Specified by:
 getRuntimeArgsin interfaceNativeImageRuntimeOptions- Returns:
 - The arguments. Returns an empty list if there are no arguments.
 
 - 
getDebug
Gets the value which toggles native-image debug symbol output.- Specified by:
 getDebugin interfaceNativeImageCompileOptions- Returns:
 - Is debug enabled
 
 - 
getFallback
- Specified by:
 getFallbackin interfaceNativeImageCompileOptions- Returns:
 - Whether to enable fallbacks (defaults to false).
 
 - 
getVerbose
Gets the value which toggles native-image verbose output.- Specified by:
 getVerbosein interfaceNativeImageCompileOptions- Returns:
 - Is verbose output
 
 - 
getQuickBuild
Gets the value which determines if image is being built in quick build mode.- Specified by:
 getQuickBuildin interfaceNativeImageCompileOptions- Returns:
 - The value which determines if image is being built in quick build mode.
 
 - 
getRichOutput
Gets the value which determines if image is being built with rich output.- Specified by:
 getRichOutputin interfaceNativeImageCompileOptions- Returns:
 - The value which determines if image is being built with rich output.
 
 - 
getJavaLauncher
@Optional public abstract org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> getJavaLauncher()Returns the toolchain used to invoke native-image. Currently, pointing to a Java launcher due to Gradle limitations.- Specified by:
 getJavaLauncherin interfaceNativeImageCompileOptions- Returns:
 - the detected java launcher
 
 - 
getConfigurationFileDirectories
@InputFiles public abstract org.gradle.api.file.ConfigurableFileCollection getConfigurationFileDirectories()Returns the list of configuration file directories (e.g. resource-config.json, ...) which need to be passed to native-image.- Specified by:
 getConfigurationFileDirectoriesin interfaceNativeImageCompileOptions- Returns:
 - a collection of directories
 
 - 
getExcludeConfig
Returns the MapProperty that contains information about configuration that should be excluded during image building. It consists of dependency coordinates and a list of regular expressions that match resources that should be excluded.- Specified by:
 getExcludeConfigin interfaceNativeImageCompileOptions- Returns:
 - a map of filters for configuration exclusion
 
 - 
getResources
- Specified by:
 getResourcesin interfaceNativeImageCompileOptions
 - 
resources
- Specified by:
 resourcesin interfaceNativeImageOptions
 - 
buildArgs
Adds arguments for the native-image invocation.- Specified by:
 buildArgsin interfaceNativeImageOptions- Parameters:
 buildArgs- Arguments for the native-image invocation.- Returns:
 - this
 
 - 
buildArgs
Adds arguments for the native-image invocation.- Specified by:
 buildArgsin interfaceNativeImageOptions- Parameters:
 buildArgs- Arguments for the native-image invocation.- Returns:
 - this
 
 - 
systemProperties
Adds some system properties to be used by the native-image builder process.- Specified by:
 systemPropertiesin interfaceNativeImageOptions- 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.- Specified by:
 systemPropertyin interfaceNativeImageOptions- 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.- Specified by:
 classpathin interfaceNativeImageOptions- Parameters:
 paths- The classpath elements.- Returns:
 - this
 
 - 
jvmArgs
Adds some arguments to use when launching the JVM for the native-image building process.- Specified by:
 jvmArgsin interfaceNativeImageOptions- Parameters:
 arguments- The arguments.- Returns:
 - this
 
 - 
jvmArgs
Adds some arguments to use when launching the JVM for the native-image building process.- Specified by:
 jvmArgsin interfaceNativeImageOptions- Parameters:
 arguments- The arguments. Must not be null.- Returns:
 - this
 
 - 
runtimeArgs
Adds some arguments to use when launching the built image.- Specified by:
 runtimeArgsin interfaceNativeImageOptions- Parameters:
 arguments- The arguments.- Returns:
 - this
 
 - 
runtimeArgs
Adds some arguments to use when launching the built image.- Specified by:
 runtimeArgsin interfaceNativeImageOptions- Parameters:
 arguments- The arguments. Must not be null.- Returns:
 - this
 
 - 
getAgent
- Specified by:
 getAgentin interfaceNativeImageCompileOptions
 - 
agent
- Specified by:
 agentin interfaceNativeImageOptions
 - 
getLayers
- Specified by:
 getLayersin interfaceNativeImageCompileOptions
 - 
layers
public void layers(org.gradle.api.Action<? super org.gradle.api.DomainObjectSet<LayerOptions>> spec) - Specified by:
 layersin interfaceNativeImageCompileOptions
 - 
useLayer
- Specified by:
 useLayerin interfaceNativeImageCompileOptions
 - 
createLayer
- Specified by:
 createLayerin interfaceNativeImageCompileOptions
 
 -