Package: org.ysb33r.grolifant5.api.core.runnable

[Groovy] Class AbstractToolExtension<T extends AbstractToolExtension>

    • Field Detail

    • Constructor Detail

      • protected AbstractToolExtension(ProjectOperations projectOperations)

        Attach this extension to a project

        Parameters:
        projectOperations - ProjectOperations instance.

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

        Attach this extension to a task

        Parameters:
        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.

    • Method Detail

      • void executableByVersion(Object version)

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

        Parameters:
        version - Something resolvable to a string.

      • protected String executableVersionOrNull()

        Resolves the version if it has been set.

        Returns:
        Version string or null.

      • protected abstract ExecutableDownloader getDownloader()

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

        Returns:
        A downloader that can be used to retrieve an executable.

      • @Override protected void unsetNonPaths()

        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.