Class EnhancedPlugin<T>
- Type Parameters:
T- The type of target
- All Implemented Interfaces:
EnhancedPluginAdditions,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 BuildLayoutThe build layout provided by Gradle services.protected abstract ObjectFactoryThe object factory provided by Gradle services.protected abstract ProjectLayoutThe project layout provided by Gradle services.protected abstract ProviderFactoryThe provider factory provided by Gradle services.Gets 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.final DirectoryPropertyGets the working project directory to be used for this plugin.
-
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
The object factory provided by Gradle services.- Returns:
- The object factory
- See Also:
-
getProjectLayout
The project layout provided by Gradle services.- Returns:
- The build layout
- See Also:
-
getBuildLayout
The build layout provided by Gradle services.- Returns:
- The build layout
- See Also:
-
getProviders
The provider factory provided by Gradle services.- Returns:
- The provider factory
- 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
Description copied from interface:EnhancedPluginAdditionsGets 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.- Specified by:
globalCachesin interfaceEnhancedPluginAdditions- Returns:
- The global caches
-
localCaches
Description copied from interface:EnhancedPluginAdditionsGets 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.- Specified by:
localCachesin interfaceEnhancedPluginAdditions- Returns:
- The global caches
-
workingProjectDirectory
Description copied from interface:EnhancedPluginAdditionsGets 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 not either type will throw an exception.It is located in
project/build/minecraftforge/plugin.- Specified by:
workingProjectDirectoryin interfaceEnhancedPluginAdditions- Returns:
- The working project directory
-