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.org.gradle.api.file.DirectoryPropertyGets the global caches to be used for this plugin.org.gradle.api.file.DirectoryPropertyGets the local caches to be used for this plugin.org.gradle.api.file.DirectoryPropertyGets the root project directory to be used for this plugin.org.gradle.api.file.DirectoryPropertyGets the working project directory to be used for this plugin.
-
Method Details
-
globalCaches
org.gradle.api.file.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
org.gradle.api.file.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
org.gradle.api.file.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
org.gradle.api.file.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)