Interface Tool.Definition

All Superinterfaces:
org.gradle.api.Named
Enclosing interface:
Tool

@Experimental public static sealed interface Tool.Definition extends org.gradle.api.Named
A definition of how a tool should be resolved and used by the plugin.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Named

    org.gradle.api.Named.Namer
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.file.ConfigurableFileCollection
    Gets the classpath to use for the tool.
    org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher>
    Gets the Java launcher used to run AccessTransformers.
    org.gradle.api.provider.Property<String>
    Gets the main class to invoke when running AccessTransformers.

    Methods inherited from interface org.gradle.api.Named

    getName
  • Method Details

    • getClasspath

      org.gradle.api.file.ConfigurableFileCollection getClasspath()
      Gets the classpath to use for the tool. If empty, the static default set by the plugin will be used.
      Returns:
      The classpath
      API Note:
      This is not the dependency's classpath. This is the classpath used in JavaExecSpec.setClasspath(FileCollection) to invoke AccessTransformers.
    • getMainClass

      org.gradle.api.provider.Property<String> getMainClass()
      Gets the main class to invoke when running AccessTransformers.
      Returns:
      The property for the main class.
      API Note:
      This is not required if the classpath is a single executable jar.
    • getJavaLauncher

      org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> getJavaLauncher()

      Gets the Java launcher used to run AccessTransformers.

      This can be easily acquired using Java toolchains.

      Returns:
      The property for the Java launcher
      See Also:
      • JavaToolchainService.launcherFor(Action)