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).
    • Method Detail

      • getName

        @Internal
        java.lang.String getName()
        Specified by:
        getName in interface org.gradle.api.Named
      • 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 property
        value - 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
      • getRequiredVersion

        @Input
        @Optional
        @Deprecated
        org.gradle.api.provider.Property<java.lang.String> getRequiredVersion()
        Deprecated.
        deprecated without replacement.
        Specify the minimal GraalVM version, can be MAJOR, MAJOR.MINOR or MAJOR.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.