Package: org.ysb33r.grolifant.api.v4.runnable

[Groovy] Class AbstractToolExtension<T extends AbstractToolExtension>

    • Constructor Detail

      • protected AbstractToolExtension(ProjectOperations projectOperations)

        Attach this extension to a project

        projectOperations - ProjectOperations instance.

      • protected AbstractToolExtension(Task task, ProjectOperations projectOperations, T projectExtension)

        Attach this extension to a task

        task - Task to attach to.
        projectOperations - ProjectOperations instance.
        projectExtName - Name of the extension that is attached to the project.

    • Method Detail

      • void executableByPath(Object path)

        Locate an executable by a local path.

        path - Something resolvable to a File.

      • void executableBySearchPath(Object baseName)

        Locate executable by searching the current environmental search path.

        baseName - The base name of the executable

      • void executableByVersion(Object version)

        Locate an executable by version, probably downloading it if not local.

        version - Something resolvable to a string.

      • protected File executablePathOrNull()

        If a path has been set instead of a version, resolve the path.

        Path to executable or null

      • protected File executableSearchPathOrNull()

        If a search path has been set, resolve the location by searching path

        Path to executable or null if search path was not set

      • protected String executableVersionOrNull()

        Resolves the version if it has been set.

        Version string or null.

      • protected ExecutableDownloader getDownloader()

        Gets the downloader implementation. Can throw an exception if downloading is not supported.

        A downloader that can be used to retrieve an executable.

      • Provider<File> getExecutable()

        A provider for a resolved executable.

        File provider.

      • java.util.List<String> getWindowsExtensionSearchOrder()

        The order in which extensions will be checked for locating an executable on Windows. The default is to use whatever is in the PATHEXT environmental variable.


      • Provider<String> resolvedExecutableVersion()

        If configured by version returns that, otherwise it might run the executable to obtain the version.

        Provider to a version string.

      • protected String runExecutableAndReturnVersion()

        Runs the executable and returns the version. See ExecUtils.parseVersionFromOutput as a helper to implement this method.

        ConfigurationException if configuration is not correct or version could not be determined.
        Version string.

      • void setWindowsExtensionSearchOrder(Iterable<String> order)

        When searching for executables, the order in which to use check for file extensions.

        order - List of extensions.

      • void setWindowsExtensionSearchOrder(String... order)