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 Details

    • getName

      @Internal String getName()
      Specified by:
      getName in interface org.gradle.api.Named
    • resources

      void resources(org.gradle.api.Action<? super NativeResourcesOptions> spec)
    • buildArgs

      NativeImageOptions buildArgs(Object... buildArgs)
      Adds arguments for the native-image invocation.
      Parameters:
      buildArgs - Arguments for the native-image invocation.
      Returns:
      this
    • buildArgs

      NativeImageOptions buildArgs(Iterable<?> buildArgs)
      Adds arguments for the native-image invocation.
      Parameters:
      buildArgs - Arguments for the native-image invocation.
      Returns:
      this
    • systemProperties

      NativeImageOptions systemProperties(Map<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(String name, 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(Object... paths)
      Adds elements to the classpath for the native-image building.
      Parameters:
      paths - The classpath elements.
      Returns:
      this
    • jvmArgs

      NativeImageOptions jvmArgs(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(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(Object... arguments)
      Adds some arguments to use when launching the built image.
      Parameters:
      arguments - The arguments.
      Returns:
      this
    • runtimeArgs

      NativeImageOptions runtimeArgs(Iterable<?> arguments)
      Adds some arguments to use when launching the built image.
      Parameters:
      arguments - The arguments. Must not be null.
      Returns:
      this
    • agent

      void agent(org.gradle.api.Action<? super DeprecatedAgentOptions> spec)
    • getRequiredVersion

      @Input @Optional @Deprecated org.gradle.api.provider.Property<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.