@groovy.transform.CompileStatic abstract class AbstractNativeToolchain extends Object implements ToolLocation
A base class for implementing toolchains based up on external tools that can be download or found installed on the local filesystem.
| Modifiers | Name | Description |
|---|---|---|
protected ConfigCacheSafeOperations |
ccso |
| Type | Name and description |
|---|---|
Iterable<String> |
windowsExtensionSearchOrder |
| Constructor and description |
|---|
protected AbstractNativeToolchain
(Project project) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
executableByPath(Object path) |
|
void |
executableBySearchPath(Object baseName) |
|
void |
executableByVersion(Object version) |
|
protected abstract ExecutableDownloader |
getDownloader()Gets the downloader implementation. |
|
Provider<File> |
getExecutable() |
|
Provider<String> |
getExecutableVersion() |
|
java.util.List<String> |
getWindowsExtensionSearchOrder() |
|
protected abstract String |
runExecutableAndReturnVersion(File exe)Runs the executable and returns the version. |
|
void |
setWindowsExtensionSearchOrder(Iterable<String> order) |
|
void |
setWindowsExtensionSearchOrder(String[] order) |
|
protected void |
unsetNonPaths()This is used when path or search path is set to unset other search mechanisms. |
|
protected void |
unsetPaths()Unset both the fixed path and search path. |
Gets the downloader implementation. Can throw an exception if downloading is not supported.
Runs the executable and returns the version. See ExecTools.parseVersionFromOutput as a helper to implement this method.
exe - Executable locationThis 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.
Unset both the fixed path and search path. THis can be used by derived classes to ensure that paths are not included in exectuble resolution
Groovy Documentation