Class CustomPropertyAnalyzerPlugin
java.lang.Object
io.github.timoIpeters.custompropertyanalyzer.CustomPropertyAnalyzerPlugin
- All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>
public class CustomPropertyAnalyzerPlugin
extends Object
implements org.gradle.api.Plugin<org.gradle.api.Project>
Entry point for the Custom Property Analyzer Gradle plugin.
Applying this plugin registers the following tasks:
analyzeCustomProperties— scans the project's Java source files for@Valueand@ConfigurationPropertiesannotations and produces a JSON report of all discovered custom properties and their default values.checkUnusedProperties— compares the properties defined in configuration files against those discovered byanalyzeCustomPropertiesand flags any that are never referenced in code. Depends onanalyzeCustomPropertiesand fails the build by default if unused properties are found.
The plugin also applies the java plugin if not already present, as it relies
on the main source set to locate Java files for analysis.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CustomPropertyAnalyzerPlugin
public CustomPropertyAnalyzerPlugin()
-
-
Method Details
-
apply
public void apply(org.gradle.api.Project project) - Specified by:
applyin interfaceorg.gradle.api.Plugin<org.gradle.api.Project>
-