Class EnhancedPlugin<T>
java.lang.Object
net.minecraftforge.gradleutils.shared.EnhancedPlugin<T>
- Type Parameters:
T- The type of target
- All Implemented Interfaces:
Plugin<T>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEnhancedPlugin(String name, String displayName) This constructor must be called by all subclasses using a public constructor annotated withInject. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidThis method is used by Gradle to apply this plugin.protected abstract BuildLayoutprotected abstract ObjectFactoryprotected abstract ProviderFactoryGets a provider to the file for aToolto be used.final DirectoryPropertyGets the global caches to be used for this plugin.final DirectoryPropertyGets the local caches to be used for this plugin.abstract voidCalled when this plugin is applied to do setup work.
-
Constructor Details
-
EnhancedPlugin
This constructor must be called by all subclasses using a public constructor annotated withInject. The name and display name passed in are used in a minimal instance ofEnhancedProblems, which is used to set up the plugin's global and local caches. Additionally, the name is used to create the cache folders (minecraftforge/name).- Parameters:
name- The name for this plugin (must be machine-friendly)displayName- The display name for this plugin
-
-
Method Details
-
getObjects
- See Also:
-
getBuildLayout
- See Also:
-
getProviders
- See Also:
-
apply
-
setup
Called when this plugin is applied to do setup work.- Parameters:
target- The target for this plugin (can also get after setup withgetTarget())
-
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
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 notProjectorSettings)
-