Interface EnhancedPluginAdditions

All Known Subinterfaces:
EnhancedTask
All Known Implementing Classes:
EnhancedPlugin

public interface EnhancedPluginAdditions
This interface defines the additional methods added by EnhancedPlugin. They are additionally accessible in tasks that implement EnhancedTask.
  • Method Details

    • getTool

      Provider<File> getTool(Tool tool)
      Gets a provider to the file for a Tool to be used. The tool's state is managed by Gradle through the ValueSource API and will not cause caching issues.
      Parameters:
      tool - The tool to get
      Returns:
      A provider for the tool file
    • globalCaches

      DirectoryProperty globalCaches()

      Gets the global caches to be used for this plugin. These caches persist between projects and should be used to eliminate excess work done by projects that request the same data.

      It is stored in ~/.gradle/caches/minecraftforge/plugin.

      Returns:
      The global caches
      Throws:
      RuntimeException - If this plugin cannot access global caches (i.e. the target is not Project or Settings)
    • localCaches

      DirectoryProperty localCaches()

      Gets the local caches to be used for this plugin. Data done by tasks that should not be shared between projects should be stored here.

      It is located in project/build/minecraftforge/plugin.

      Returns:
      The global caches
      Throws:
      RuntimeException - If this plugin cannot access global caches (i.e. the target is not Project or Settings)
    • workingProjectDirectory

      DirectoryProperty workingProjectDirectory()

      Gets the working project directory to be used for this plugin. This directory is either the ProjectLayout.getProjectDirectory() of the Project or the BuildLayout.getRootDirectory() of the Settings. Attempting to call this when the plugin target is not either type will throw an exception.

      It is located in project/build/minecraftforge/plugin.

      Returns:
      The working project directory
      Throws:
      RuntimeException - If this plugin cannot access the working project directory (i.e. the target is not Project or Settings)