Class DelegatingCompileOptions
- java.lang.Object
-
- org.graalvm.buildtools.gradle.internal.DelegatingCompileOptions
-
- All Implemented Interfaces:
NativeImageCompileOptions
public class DelegatingCompileOptions extends java.lang.Object implements NativeImageCompileOptions
Configuration options for compiling a native binary.
-
-
Constructor Summary
Constructors Constructor Description DelegatingCompileOptions(NativeImageCompileOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeprecatedAgentOptions
getAgent()
org.gradle.api.provider.ListProperty<java.lang.String>
getBuildArgs()
Returns the arguments for the native-image invocation.org.gradle.api.file.ConfigurableFileCollection
getClasspath()
Returns the classpath for the native-image building.org.gradle.api.file.ConfigurableFileCollection
getConfigurationFileDirectories()
Returns the list of configuration file directories (e.g.org.gradle.api.provider.Property<java.lang.Boolean>
getDebug()
Gets the value which toggles native-image debug symbol output.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.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.org.gradle.api.provider.ListProperty<java.lang.String>
getExcludeConfigArgs()
org.gradle.api.provider.Property<java.lang.Boolean>
getFallback()
org.gradle.api.provider.Property<java.lang.String>
getImageName()
Gets the name of the native executable to be generated.org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher>
getJavaLauncher()
Returns the toolchain used to invoke native-image.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.org.gradle.api.provider.Property<java.lang.String>
getMainClass()
Returns the fully qualified name of the Main class to be executed.org.gradle.api.provider.Property<java.lang.Boolean>
getPgoInstrument()
When set to true, the compiled binaries will be generated with PGO instrumentation support.org.gradle.api.file.DirectoryProperty
getPgoProfilesDirectory()
org.gradle.api.provider.Property<java.lang.Boolean>
getQuickBuild()
Gets the value which determines if image is being built in quick build mode.NativeResourcesOptions
getResources()
org.gradle.api.provider.Property<java.lang.Boolean>
getRichOutput()
Gets the value which determines if image is being built with rich output.org.gradle.api.provider.Property<java.lang.Boolean>
getSharedLibrary()
Gets the value which determines if shared library is being built.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.org.gradle.api.provider.Property<java.lang.Boolean>
getUseFatJar()
If set to true, this will build a fat jar of the image classpath instead of passing each jar individually to the classpath.org.gradle.api.provider.Property<java.lang.Boolean>
getVerbose()
Gets the value which toggles native-image verbose output.
-
-
-
Constructor Detail
-
DelegatingCompileOptions
public DelegatingCompileOptions(NativeImageCompileOptions options)
-
-
Method Detail
-
getImageName
public org.gradle.api.provider.Property<java.lang.String> getImageName()
Description copied from interface:NativeImageCompileOptions
Gets the name of the native executable to be generated.- Specified by:
getImageName
in interfaceNativeImageCompileOptions
- Returns:
- The image name property.
-
getJavaLauncher
public org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> getJavaLauncher()
Description copied from interface:NativeImageCompileOptions
Returns the toolchain used to invoke native-image. Currently pointing to a Java launcher due to Gradle limitations.- Specified by:
getJavaLauncher
in interfaceNativeImageCompileOptions
- Returns:
- the detected java launcher
-
getMainClass
public org.gradle.api.provider.Property<java.lang.String> getMainClass()
Description copied from interface:NativeImageCompileOptions
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-Class
attribute.- Specified by:
getMainClass
in interfaceNativeImageCompileOptions
- Returns:
- mainClass The main class.
-
getBuildArgs
public org.gradle.api.provider.ListProperty<java.lang.String> getBuildArgs()
Description copied from interface:NativeImageCompileOptions
Returns the arguments for the native-image invocation.- Specified by:
getBuildArgs
in interfaceNativeImageCompileOptions
- Returns:
- Arguments for the native-image invocation.
-
getSystemProperties
public org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Object> getSystemProperties()
Description copied from interface:NativeImageCompileOptions
Returns the system properties which will be used by the native-image builder process.- Specified by:
getSystemProperties
in interfaceNativeImageCompileOptions
- Returns:
- The system properties. Returns an empty map when there are no system properties.
-
getEnvironmentVariables
public org.gradle.api.provider.MapProperty<java.lang.String,java.lang.Object> getEnvironmentVariables()
Description copied from interface:NativeImageCompileOptions
Returns the environment variables which will be used by the native-image builder process.- Specified by:
getEnvironmentVariables
in interfaceNativeImageCompileOptions
- Returns:
- the environment variables. Returns an empty map when there are no environment variables.
-
getClasspath
public org.gradle.api.file.ConfigurableFileCollection getClasspath()
Description copied from interface:NativeImageCompileOptions
Returns the classpath for the native-image building.- Specified by:
getClasspath
in interfaceNativeImageCompileOptions
- Returns:
- classpath The classpath for the native-image building.
-
getJvmArgs
public org.gradle.api.provider.ListProperty<java.lang.String> getJvmArgs()
Description copied from interface:NativeImageCompileOptions
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:
getJvmArgs
in interfaceNativeImageCompileOptions
- Returns:
- The arguments. Returns an empty list if there are no arguments.
-
getDebug
public org.gradle.api.provider.Property<java.lang.Boolean> getDebug()
Description copied from interface:NativeImageCompileOptions
Gets the value which toggles native-image debug symbol output.- Specified by:
getDebug
in interfaceNativeImageCompileOptions
- Returns:
- Is debug enabled
-
getFallback
public org.gradle.api.provider.Property<java.lang.Boolean> getFallback()
- Specified by:
getFallback
in interfaceNativeImageCompileOptions
- Returns:
- Whether to enable fallbacks (defaults to false).
-
getVerbose
public org.gradle.api.provider.Property<java.lang.Boolean> getVerbose()
Description copied from interface:NativeImageCompileOptions
Gets the value which toggles native-image verbose output.- Specified by:
getVerbose
in interfaceNativeImageCompileOptions
- Returns:
- Is verbose output
-
getSharedLibrary
public org.gradle.api.provider.Property<java.lang.Boolean> getSharedLibrary()
Description copied from interface:NativeImageCompileOptions
Gets the value which determines if shared library is being built.- Specified by:
getSharedLibrary
in interfaceNativeImageCompileOptions
- Returns:
- The value which determines if shared library is being built.
-
getQuickBuild
public org.gradle.api.provider.Property<java.lang.Boolean> getQuickBuild()
Description copied from interface:NativeImageCompileOptions
Gets the value which determines if image is being built in quick build mode.- Specified by:
getQuickBuild
in interfaceNativeImageCompileOptions
- Returns:
- The value which determines if image is being built in quick build mode.
-
getRichOutput
public org.gradle.api.provider.Property<java.lang.Boolean> getRichOutput()
Description copied from interface:NativeImageCompileOptions
Gets the value which determines if image is being built with rich output.- Specified by:
getRichOutput
in interfaceNativeImageCompileOptions
- Returns:
- The value which determines if image is being built with rich output.
-
getExcludeConfig
public org.gradle.api.provider.MapProperty<java.lang.Object,java.util.List<java.lang.String>> getExcludeConfig()
Description copied from interface:NativeImageCompileOptions
Returns the MapProperty that contains information about configuration that should be excluded during image building. It consists of a dependency coordinates and a list of regular expressions that match resources that should be excluded as a value.- Specified by:
getExcludeConfig
in interfaceNativeImageCompileOptions
- Returns:
- a map of filters for configuration exclusion
-
getResources
public NativeResourcesOptions getResources()
- Specified by:
getResources
in interfaceNativeImageCompileOptions
-
getConfigurationFileDirectories
public org.gradle.api.file.ConfigurableFileCollection getConfigurationFileDirectories()
Description copied from interface:NativeImageCompileOptions
Returns the list of configuration file directories (e.g. resource-config.json, ...) which need to be passed to native-image.- Specified by:
getConfigurationFileDirectories
in interfaceNativeImageCompileOptions
- Returns:
- a collection of directories
-
getExcludeConfigArgs
public org.gradle.api.provider.ListProperty<java.lang.String> getExcludeConfigArgs()
- Specified by:
getExcludeConfigArgs
in interfaceNativeImageCompileOptions
-
getUseFatJar
public org.gradle.api.provider.Property<java.lang.Boolean> getUseFatJar()
Description copied from interface:NativeImageCompileOptions
If set to true, this will build a fat jar of the image classpath instead of passing each jar individually to the classpath. This option can be used in case the classpath is too long and that invoking native image fails, which can happen on Windows.- Specified by:
getUseFatJar
in interfaceNativeImageCompileOptions
- Returns:
- true if a fatjar should be used. Defaults to true for Windows, and false otherwise.
-
getAgent
public DeprecatedAgentOptions getAgent()
- Specified by:
getAgent
in interfaceNativeImageCompileOptions
-
getPgoInstrument
public org.gradle.api.provider.Property<java.lang.Boolean> getPgoInstrument()
Description copied from interface:NativeImageCompileOptions
When set to true, the compiled binaries will be generated with PGO instrumentation support.- Specified by:
getPgoInstrument
in interfaceNativeImageCompileOptions
- Returns:
- the PGO instrumentation flag
-
getPgoProfilesDirectory
public org.gradle.api.file.DirectoryProperty getPgoProfilesDirectory()
- Specified by:
getPgoProfilesDirectory
in interfaceNativeImageCompileOptions
-
-