@groovy.transform.CompileStatic @groovy.util.logging.Slf4j @SuppressWarnings(value: AbstractClassWithoutAbstractMethod) abstract class AbstractDistributionInstaller extends AbstractBaseDistributionInstaller implements DistributionInstaller
Common functionality to be able to download a SDK and use it within Gradle
| Modifiers | Name | Description |
|---|---|---|
class |
AbstractDistributionInstaller.1 |
| Fields inherited from class | Fields |
|---|---|
class AbstractBaseDistributionInstaller |
IS_MACOSX, IS_WINDOWS, ccso, distributionName, execPatterns |
| Type | Name and description |
|---|---|
String |
sdkManCandidateName |
| Constructor and description |
|---|
protected AbstractDistributionInstaller
(String distributionName, String basePath, ConfigCacheSafeOperations taskComponents)Creates setup for installing to a local cache. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected File |
getDistFromCache(String version)Creates a distribution if it does not exist already. |
|
protected File |
getDistFromSdkMan(String version)Attempts to locate distribution in the list of SdkMan candidates. |
|
Provider<File> |
getDistributionFile(String version, String fileRelPath)Locates a file within the distribution |
|
Provider<File> |
getDistributionRoot(String version)Returns the location which is the top or home folder for a distribution. |
|
String |
getSdkManCandidateName()SDKman candidate name for distribution. |
|
protected File |
resolveDistributionLocationForVersion(String version)Resolves distribution location by looking in various locations. |
|
void |
setSdkManCandidateName(String sdkCandidateName)Set candidate name for SdkMan if the latter should be searched for installed versions |
| Methods inherited from class | Name |
|---|---|
class AbstractBaseDistributionInstaller |
addExecPattern, extractFinalExtension, getDistFromCache, listDirs, setChecksum, setDownloadRoot, unpack, unpackParametersForExtension, verifyDistributionRoot, verifyDownloadChecksum |
Creates setup for installing to a local cache.
distributionName - Descriptive name of the distributionbasePath - Relative path below Gradle User Home to create cache for all version of this distribution type.taskComponents - Gradle project operations that this downloader can use.Creates a distribution if it does not exist already.
Attempts to locate distribution in the list of SdkMan candidates.
Locates a file within the distribution
version - Version of distribution to search.fileRelPath - Relative path to the distribution root.Returns the location which is the top or home folder for a distribution. This value is affected by setDownloadRoot(java.io.File) and the parameters passed in during construction time.
SDKman candidate name for distribution.
null.Resolves distribution location by looking in various locations.
version - Version to resolvenull if nothing could be found.Set candidate name for SdkMan if the latter should be searched for installed versions
sdkCandidateName - SDK Candidate name. This is the same names that will be shown when
running sdk list candidates on the script-line.Groovy Documentation