Interface EnhancedPluginAdditions
- All Known Subinterfaces:
EnhancedTask<P>
- All Known Implementing Classes:
EnhancedPlugin,ToolExecBase
EnhancedPlugin. They are additionally accessible in tasks
that implement EnhancedTask.-
Method Summary
Modifier and TypeMethodDescriptionGets a provider to the file for aToolto be used.Gets the global caches to be used for this plugin.Gets the local caches to be used for this plugin.Gets the root project directory to be used for this plugin.Gets the working project directory to be used for this plugin.
-
Method Details
-
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 notProjectorSettings)
-
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 local caches (i.e. the target is notProjectorSettings)
-
rootProjectDirectory
DirectoryProperty rootProjectDirectory()Gets the root project directory to be used for this plugin.
This directory is either the
ProjectLayout.getProjectDirectory()ofProject.getRootProject()or theBuildLayout.getRootDirectory()of theSettings. Attempting to call this when the plugin target is neither type will throw an exception.- Returns:
- The root project directory
- Throws:
RuntimeException- If this plugin cannot access the root project directory (i.e. the target is notProjectorSettings)
-
workingProjectDirectory
DirectoryProperty workingProjectDirectory()Gets the working project directory to be used for this plugin.
This directory is either the
ProjectLayout.getProjectDirectory()of theProjector theBuildLayout.getRootDirectory()of theSettings. Attempting to call this when the plugin target is neither type will throw an exception.- Returns:
- The working project directory
- Throws:
RuntimeException- If this plugin cannot access the working project directory (i.e. the target is notProjectorSettings)