Class BaseNativeImageOptions
- java.lang.Object
- 
- org.graalvm.buildtools.gradle.internal.BaseNativeImageOptions
 
- 
- All Implemented Interfaces:
- NativeImageCompileOptions,- NativeImageOptions,- NativeImageRuntimeOptions,- org.gradle.api.Named
 
 public abstract class BaseNativeImageOptions extends java.lang.Object implements NativeImageOptions Class that declares native image options.
- 
- 
Constructor SummaryConstructors Constructor Description BaseNativeImageOptions(java.lang.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, java.lang.String defaultImageName)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidagent(org.gradle.api.Action<? super DeprecatedAgentOptions> spec)BaseNativeImageOptionsbuildArgs(java.lang.Iterable<?> buildArgs)Adds arguments for the native-image invocation.BaseNativeImageOptionsbuildArgs(java.lang.Object... buildArgs)Adds arguments for the native-image invocation.BaseNativeImageOptionsclasspath(java.lang.Object... paths)Adds elements to the classpath for the native-image building.abstract DeprecatedAgentOptionsgetAgent()abstract org.gradle.api.provider.ListProperty<java.lang.String>getBuildArgs()Returns the arguments for the native-image invocation.abstract org.gradle.api.file.ConfigurableFileCollectiongetClasspath()Returns the classpath for the native-image building.abstract org.gradle.api.file.ConfigurableFileCollectiongetConfigurationFileDirectories()Returns the list of configuration file directories (e.g.abstract org.gradle.api.provider.Property<java.lang.Boolean>getDebug()Gets the value which toggles native-image debug symbol output.abstract org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Object>getEnvironmentVariables()Returns the environment variables which will be used by the native-image builder process.abstract org.gradle.api.provider.MapProperty<java.lang.Object,java.util.List<java.lang.String>>getExcludeConfig()Returns the MapProperty that contains information about configuration that should be excluded during image building.abstract org.gradle.api.provider.Property<java.lang.Boolean>getFallback()abstract org.gradle.api.provider.Property<java.lang.String>getImageName()Gets the name of the native executable to be generated.abstract org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher>getJavaLauncher()Returns the toolchain used to invoke native-image.abstract org.gradle.api.provider.ListProperty<java.lang.String>getJvmArgs()Returns the extra arguments to use when launching the JVM for the native-image building process.abstract org.gradle.api.provider.Property<java.lang.String>getMainClass()Returns the fully qualified name of the Main class to be executed.java.lang.StringgetName()abstract org.gradle.api.provider.Property<java.lang.Boolean>getQuickBuild()Gets the value which determines if image is being built in quick build mode.abstract NativeResourcesOptionsgetResources()abstract org.gradle.api.provider.Property<java.lang.Boolean>getRichOutput()Gets the value which determines if image is being built with rich output.abstract org.gradle.api.provider.ListProperty<java.lang.String>getRuntimeArgs()Returns the arguments to use when launching the built image.abstract org.gradle.api.provider.Property<java.lang.Boolean>getSharedLibrary()Gets the value which determines if shared library is being built.abstract org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Object>getSystemProperties()Returns the system properties which will be used by the native-image builder process.abstract org.gradle.api.provider.Property<java.lang.Boolean>getVerbose()Gets the value which toggles native-image verbose output.BaseNativeImageOptionsjvmArgs(java.lang.Iterable<?> arguments)Adds some arguments to use when launching the JVM for the native-image building process.BaseNativeImageOptionsjvmArgs(java.lang.Object... arguments)Adds some arguments to use when launching the JVM for the native-image building process.voidresources(org.gradle.api.Action<? super NativeResourcesOptions> spec)BaseNativeImageOptionsruntimeArgs(java.lang.Iterable<?> arguments)Adds some arguments to use when launching the built image.BaseNativeImageOptionsruntimeArgs(java.lang.Object... arguments)Adds some arguments to use when launching the built image.BaseNativeImageOptionssystemProperties(java.util.Map<java.lang.String,?> properties)Adds some system properties to be used by the native-image builder process.BaseNativeImageOptionssystemProperty(java.lang.String name, java.lang.Object value)Adds a system property to be used by the native-image builder process.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.graalvm.buildtools.gradle.dsl.NativeImageCompileOptionsgetExcludeConfigArgs, getPgoInstrument, getPgoProfilesDirectory, getUseFatJar
 - 
Methods inherited from interface org.graalvm.buildtools.gradle.dsl.NativeImageOptionsasCompileOptions, getRequiredVersion
 
- 
 
- 
- 
- 
Constructor Detail- 
BaseNativeImageOptions@Inject public BaseNativeImageOptions(java.lang.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, java.lang.String defaultImageName)
 
- 
 - 
Method Detail- 
getName@Internal public java.lang.String getName() - Specified by:
- getNamein interface- org.gradle.api.Named
- Specified by:
- getNamein interface- NativeImageOptions
 
 - 
getImageName@Input public abstract org.gradle.api.provider.Property<java.lang.String> getImageName() Gets the name of the native executable to be generated.- Specified by:
- getImageNamein interface- NativeImageCompileOptions
- Returns:
- The image name property.
 
 - 
getMainClass@Input @Optional public abstract org.gradle.api.provider.Property<java.lang.String> 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 interface- NativeImageCompileOptions
- Returns:
- mainClass The main class.
 
 - 
getBuildArgs@Input public abstract org.gradle.api.provider.ListProperty<java.lang.String> getBuildArgs() Returns the arguments for the native-image invocation.- Specified by:
- getBuildArgsin interface- NativeImageCompileOptions
- Returns:
- Arguments for the native-image invocation.
 
 - 
getSystemProperties@Input public abstract org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Object> getSystemProperties() Returns the system properties which will be used by the native-image builder process.- Specified by:
- getSystemPropertiesin interface- NativeImageCompileOptions
- Returns:
- The system properties. Returns an empty map when there are no system properties.
 
 - 
getEnvironmentVariablespublic abstract org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Object> getEnvironmentVariables() Returns the environment variables which will be used by the native-image builder process.- Specified by:
- getEnvironmentVariablesin interface- NativeImageCompileOptions
- 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 interface- NativeImageCompileOptions
- Returns:
- classpath The classpath for the native-image building.
 
 - 
getJvmArgs@Input public abstract org.gradle.api.provider.ListProperty<java.lang.String> 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 interface- NativeImageCompileOptions
- Returns:
- The arguments. Returns an empty list if there are no arguments.
 
 - 
getRuntimeArgs@Input public abstract org.gradle.api.provider.ListProperty<java.lang.String> getRuntimeArgs() Returns the arguments to use when launching the built image.- Specified by:
- getRuntimeArgsin interface- NativeImageRuntimeOptions
- Returns:
- The arguments. Returns an empty list if there are no arguments.
 
 - 
getDebug@Input public abstract org.gradle.api.provider.Property<java.lang.Boolean> getDebug() Gets the value which toggles native-image debug symbol output.- Specified by:
- getDebugin interface- NativeImageCompileOptions
- Returns:
- Is debug enabled
 
 - 
getFallback@Input public abstract org.gradle.api.provider.Property<java.lang.Boolean> getFallback() - Specified by:
- getFallbackin interface- NativeImageCompileOptions
- Returns:
- Whether to enable fallbacks (defaults to false).
 
 - 
getVerbose@Input public abstract org.gradle.api.provider.Property<java.lang.Boolean> getVerbose() Gets the value which toggles native-image verbose output.- Specified by:
- getVerbosein interface- NativeImageCompileOptions
- Returns:
- Is verbose output
 
 - 
getSharedLibrary@Input public abstract org.gradle.api.provider.Property<java.lang.Boolean> getSharedLibrary() Gets the value which determines if shared library is being built.- Specified by:
- getSharedLibraryin interface- NativeImageCompileOptions
- Returns:
- The value which determines if shared library is being built.
 
 - 
getQuickBuild@Input public abstract org.gradle.api.provider.Property<java.lang.Boolean> getQuickBuild() Gets the value which determines if image is being built in quick build mode.- Specified by:
- getQuickBuildin interface- NativeImageCompileOptions
- Returns:
- The value which determines if image is being built in quick build mode.
 
 - 
getRichOutput@Input public abstract org.gradle.api.provider.Property<java.lang.Boolean> getRichOutput() Gets the value which determines if image is being built with rich output.- Specified by:
- getRichOutputin interface- NativeImageCompileOptions
- 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 interface- NativeImageCompileOptions
- 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 interface- NativeImageCompileOptions
- Returns:
- a collection of directories
 
 - 
getExcludeConfig@Input public abstract org.gradle.api.provider.MapProperty<java.lang.Object,java.util.List<java.lang.String>> 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 interface- NativeImageCompileOptions
- Returns:
- a map of filters for configuration exclusion
 
 - 
getResourcespublic abstract NativeResourcesOptions getResources() - Specified by:
- getResourcesin interface- NativeImageCompileOptions
 
 - 
resourcespublic void resources(org.gradle.api.Action<? super NativeResourcesOptions> spec) - Specified by:
- resourcesin interface- NativeImageOptions
 
 - 
buildArgspublic BaseNativeImageOptions buildArgs(java.lang.Object... buildArgs) Adds arguments for the native-image invocation.- Specified by:
- buildArgsin interface- NativeImageOptions
- Parameters:
- buildArgs- Arguments for the native-image invocation.
- Returns:
- this
 
 - 
buildArgspublic BaseNativeImageOptions buildArgs(java.lang.Iterable<?> buildArgs) Adds arguments for the native-image invocation.- Specified by:
- buildArgsin interface- NativeImageOptions
- Parameters:
- buildArgs- Arguments for the native-image invocation.
- Returns:
- this
 
 - 
systemPropertiespublic BaseNativeImageOptions systemProperties(java.util.Map<java.lang.String,?> properties) Adds some system properties to be used by the native-image builder process.- Specified by:
- systemPropertiesin interface- NativeImageOptions
- Parameters:
- properties- The system properties. Must not be null.
- Returns:
- this
 
 - 
systemPropertypublic BaseNativeImageOptions systemProperty(java.lang.String name, java.lang.Object value) Adds a system property to be used by the native-image builder process.- Specified by:
- systemPropertyin interface- NativeImageOptions
- Parameters:
- name- The name of the property
- value- The value for the property. May be null.
- Returns:
- this
 
 - 
classpathpublic BaseNativeImageOptions classpath(java.lang.Object... paths) Adds elements to the classpath for the native-image building.- Specified by:
- classpathin interface- NativeImageOptions
- Parameters:
- paths- The classpath elements.
- Returns:
- this
 
 - 
jvmArgspublic BaseNativeImageOptions jvmArgs(java.lang.Object... arguments) Adds some arguments to use when launching the JVM for the native-image building process.- Specified by:
- jvmArgsin interface- NativeImageOptions
- Parameters:
- arguments- The arguments.
- Returns:
- this
 
 - 
jvmArgspublic BaseNativeImageOptions jvmArgs(java.lang.Iterable<?> arguments) Adds some arguments to use when launching the JVM for the native-image building process.- Specified by:
- jvmArgsin interface- NativeImageOptions
- Parameters:
- arguments- The arguments. Must not be null.
- Returns:
- this
 
 - 
runtimeArgspublic BaseNativeImageOptions runtimeArgs(java.lang.Object... arguments) Adds some arguments to use when launching the built image.- Specified by:
- runtimeArgsin interface- NativeImageOptions
- Parameters:
- arguments- The arguments.
- Returns:
- this
 
 - 
runtimeArgspublic BaseNativeImageOptions runtimeArgs(java.lang.Iterable<?> arguments) Adds some arguments to use when launching the built image.- Specified by:
- runtimeArgsin interface- NativeImageOptions
- Parameters:
- arguments- The arguments. Must not be null.
- Returns:
- this
 
 - 
getAgentpublic abstract DeprecatedAgentOptions getAgent() - Specified by:
- getAgentin interface- NativeImageCompileOptions
 
 - 
agentpublic void agent(org.gradle.api.Action<? super DeprecatedAgentOptions> spec) - Specified by:
- agentin interface- NativeImageOptions
 
 
- 
 
-