@groovy.transform.CompileStatic abstract class AbstractToolExtension<T extends AbstractToolExtension> extends AbstractBaseToolExtension<T> implements ToolLocation
Use as a base class for project and task extensions that will wrap tools.
This base class will also enable extensions to discover whether they are inside a task or a project.
- > The extension class that extends this base class. | Modifiers | Name | Description |
|---|---|---|
class |
AbstractToolExtension.1 |
|
class |
AbstractToolExtension.2 |
| Constructor and description |
|---|
protected AbstractToolExtension
(ProjectOperations projectOperations)Attach this extension to a project |
protected AbstractToolExtension
(Project projectOperations)Attach this extension to a project |
protected AbstractToolExtension
(Task task, ProjectOperations projectOperations, T projectExtension)Attach this extension to a task |
protected AbstractToolExtension
(Task task, T projectExtension)Attach this extension to a task |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
executableByVersion(Object version)Locate an executable by version, probably downloading it if not local. |
|
protected String |
executableVersionOrNull()Resolves the version if it has been set. |
|
protected abstract ExecutableDownloader |
getDownloader()Gets the downloader implementation. |
|
protected File |
resolveExecutable() |
|
protected void |
unsetNonPaths()This is used when path or search path is set to unset other search mechanisms. |
Attach this extension to a project
projectOperations - ProjectOperations instance.Attach this extension to a project
projectOperations - Contextual project.Attach this extension to a task
task - Task to attach to.projectOperations - ProjectOperations instance.projectExtName - Extension that is attached to the project.
Pass {@Link #noProjectExtension} is project extension is available or required.Attach this extension to a task
task - Task to attach to.projectExtName - Extension that is attached to the project.
Pass {@Link #noProjectExtension} is project extension is available or required.Locate an executable by version, probably downloading it if not local.
version - Something resolvable to a string.Resolves the version if it has been set.
null.Gets the downloader implementation. Can throw an exception if downloading is not supported.
This is used when path or search path is set to unset other search mechanisms. This is primarily intended to be used within Grolifant itself as part of its base classes and MUST be overridden in those. The default operation is NOOP.