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 TypeMethodDescriptionorg.gradle.api.provider.Property<String> Gets the artifact, in "group:name:version[:classifier][@extension]" format to use for this tool.org.gradle.api.file.ConfigurableFileCollectionGets the classpath to use for the tool.org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> Gets the Java launcher used to run this tool.org.gradle.api.provider.Property<String> Gets the main class to invoke when running this tool.org.gradle.api.provider.Property<String> Gets the version to use for the tool.Methods inherited from interface org.gradle.api.Named
getName
-
Method Details
-
getVersion
org.gradle.api.provider.Property<String> getVersion()Gets the version to use for the tool. If empty, the static default set by the plugin will be used.- Returns:
- The version to use instead of the one configured by the plugin.
- API Note:
- This will not be used if
getClasspath()orgetArtifact()has a value set.
-
getArtifact
org.gradle.api.provider.Property<String> getArtifact()Gets the artifact, in "group:name:version[:classifier][@extension]" format to use for this tool. If empty, the static default set by the plugin will be used.- Returns:
- The full artifact to use for this tool.
- API Note:
- This will not be used if
getClasspath()has a value set.
-
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 this tool.
-
getMainClass
-
getJavaLauncher
org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> getJavaLauncher()Gets the Java launcher used to run this tool.
This can be easily acquired using Java toolchains.
- Returns:
- The property for the Java launcher
- See Also:
-