Interface BuildRuntimeTask

All Superinterfaces:
Task<Image,BuildRuntimeTask>

public interface BuildRuntimeTask extends Task<Image,BuildRuntimeTask>

A task for building a custom Java runtime image for the project.

The resulting Java runtime image is an optimized assembly of the project resources (module and dependency modules) and required JDK's modules. The PackageApplicationTask requires a runtime image to create an optimized application package.

This task depends on BuildJmodTask.

Since:
1.4
Author:
Jeremy Kuhn
  • Method Details

    • addModules

      BuildRuntimeTask addModules(String addModules)

      Specifies the modules to add to the runtime image.

      Parameters:
      addModules - a comma-separated list of modules
      Returns:
      the task
    • addOptions

      BuildRuntimeTask addOptions(String addOptions)

      Specifies the options to prepend before any other options when invoking the JVM of the runtime image.

      Parameters:
      addOptions - the options to pass to the runtime image JVM
      Returns:
      the task
    • compress

      BuildRuntimeTask compress(String compress)

      Specifies the compress level of the runtime image: 0=No compression, 1=constant string sharing, 2=ZIP.

      Parameters:
      compress - the compress level
      Returns:
      the task
    • bindServices

      BuildRuntimeTask bindServices(boolean bindServices)

      Specifies whether to link in service provider modules must and their dependencies.

      Parameters:
      bindServices - true to link in service provide modules and their depenencies, false otherwise
      Returns:
      the task
    • ignoreSigningInformation

      BuildRuntimeTask ignoreSigningInformation(boolean ignoreSigningInformation)

      Specifies whether to suppress a fatal error when signed modular JARs are linked in the runtime image.

      Parameters:
      ignoreSigningInformation - true to suppress fatal error when linking signed modular JARs, false otherwise
      Returns:
      the task
    • stripDebug

      BuildRuntimeTask stripDebug(boolean stripDebug)

      Specifies whether to strip debug information from the runtime image.

      Defaults to true.

      Parameters:
      stripDebug - true to strip debug information, false otherwise
      Returns:
      the task
    • stripNativeCommands

      BuildRuntimeTask stripNativeCommands(boolean stripNativeCommands)

      Specifies whether to strip native command (eg. java...) from the runtime image.

      Defaults to true.

      Parameters:
      stripNativeCommands - true to strip native command, false otherwise
      Returns:
      the task
    • vm

      Specifies the HotSpot VM in the runtime image defined as: "client" / "server" / "minimal" / "all"

      Parameters:
      vm - the HotSpot VM in the runtime image
      Returns:
      the task
    • addUnnamedModules

      BuildRuntimeTask addUnnamedModules(boolean addUnnamedModules)

      Specifies whether unnamed modules should be added to the runtime image.

      Enabling this option would result in all unnamed dependencies to be added to the runtime image. Please consider using addModules(java.lang.String) to only add specific ones. Note that at this stage unnamed dependencies should have been modularized and should be named [GROUP].[NAME] with [NAME] being escaped to be a valid Java identifier (i.e. "-" replaced by "."...).

      Parameters:
      addUnnamedModules - true to add all unnamed modules, false otherwise
      Returns:
      the task
    • launchers

      BuildRuntimeTask launchers(List<? extends BuildRuntimeTask.Launcher> launchers)

      Specifies a list of launchers to generate in the runtime image.

      Parameters:
      launchers - a list of launchers
      Returns:
      the task
    • archive

      ArchiveTask archive()

      Creates an archive task.

      Returns:
      an archive task
    • archive

      default ArchiveTask archive(Consumer<ArchiveTask> configurer)

      Creates and configures an archive task.

      Parameters:
      configurer - a configurer
      Returns:
      a configured archive task
    • packageApplication

      PackageApplicationTask packageApplication()

      Creates a package application task.

      Returns:
      a package application task
    • packageApplication

      default PackageApplicationTask packageApplication(Consumer<PackageApplicationTask> configurer)

      Creates and configures a package application task.

      Parameters:
      configurer - a configurer
      Returns:
      a configured package application task