Package net.minecraftforge.gradleutils.shared
@Internal
@NotNullByDefault
package net.minecraftforge.gradleutils.shared
This package contains common code that is shared between MinecraftForge's Gradle plugins. The purpose is to reduce
duplicate code and keep the majority of complex implementation details here, instead of in the implementing plugins.
The majority of these implementations consist of "enhanced" types of existing Gradle types, which are extensions that include Forge-specific helper methods.
-
ClassDescriptionThis class contains helper methods for creating closures in Java code.EnhancedFlowAction<P extends EnhancedFlowAction.EnhancedFlowParameters<?>>The enhanced flow action adds convenience methods to the standard flow action provided by Gradle.The parameters, including the
EnhancedFlowAction.EnhancedFlowParameters.getFailure()property andEnhancedProblemsthroughEnhancedFlowAction.EnhancedFlowParameters.problems().The enhanced plugin contains several helper members to assist in making Gradle plugins as clean as possible without needing to duplicate code across projects.This interface defines the additional methods added byEnhancedPlugin.The enhanced problems contain several base helper members to help reduce duplicate code between Gradle plugins.EnhancedTask<P extends EnhancedProblems>The enhanced task contains a handful of helper methods to make working with the enhanced plugin and caches easier.Lazy<T>This is a simple implementation of aLazyvalue, primarily aimed for use in Java code.Represents a lazily computed value with the ability to optionally work with it usingLazy.ifPresent(Action)and safely mutate it usingLazy.Actionable.map(Action).Shared utilities for Gradle plugins.Tools are definitions of Java libraries (may or may not be executable) that are managed by Gradle using aValueSource.A definition of how a tool should be resolved and used by the plugin.A resolved tool that has a classpath that can be readily used.ToolExecBase<P extends EnhancedProblems>This tool execution task is a template on top ofJavaExecto make executing tools much easier and more consistent between plugins.This extension can be optionally enabled by implementing plugins to allow buildscript authors to drop-in replace, or otherwise customize, the tools that are used by this plugin.