Abstract base class for enhancers that modify and extend the project extension and tasks of a code quality plugin.
T - The type of task this enhancer operates on.| Constructor and description |
|---|
protected AbstractPluginEnhancer
(org.gradle.api.Project pProject, java.lang.Class<? extends org.gradle.api.Plugin<org.gradle.api.Project>> pPluginClass, java.lang.String pToolName)Create a new AbstractPluginEnhancer. |
| Type | Name and description |
|---|---|
protected static void |
configureCodeQualityExtension(org.gradle.api.plugins.quality.CodeQualityExtension pExtension)Configure a CodeQualityExtension with the default values shared by all code quality
extensions. |
void |
configureExtension()Configure the task's extension with sensible defaults. |
AbstractCheckTaskEnhancer<T> |
createTaskEnhancer(T pTask)Create a new enhancer for a task. |
protected java.io.File |
createTemporaryFileSpec(java.lang.String pFileName)Create a specification for a file in the project's temporary directory for the enhancer's tool. |
void |
enhance()Configure the extension related to the task type this enhancer operates on and then enhance all tasks in the project that have that type. |
java.lang.Class<T> |
getTaskClass()Get the task class this enhancer operates on. |
static void |
removeTestSourceSet(org.gradle.api.plugins.quality.CodeQualityExtension pExtension)Remove the test source set from a CodeQualityExtension. |
| Methods inherited from class | Name |
|---|---|
class ProjectAware |
getProject |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Create a new AbstractPluginEnhancer.
pProject - The enhanced plugin's project.pPluginClass - The plugin's class.pToolName - The plugin's tool name. Configure a CodeQualityExtension with the default values shared by all code quality
extensions. The ignoreFailures property will be set to true, and a dynamic method
with the name disableTestChecks that disables checking the test sources will be added
to the extension.
pExtension - The extension to configure.Configure the task's extension with sensible defaults.
Create a new enhancer for a task.
pTask - The task to enhance.AbstractTaskEnhancer.Create a specification for a file in the project's temporary directory for the enhancer's tool.
pFileName - The name of the file.File with the specification.Configure the extension related to the task type this enhancer operates on and then enhance all tasks in the project that have that type.
Get the task class this enhancer operates on.
Remove the test source set from a CodeQualityExtension.
pExtension - The extension to remove the test source set from.