plugin.AnalyserPlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of staticanalyser Show documentation
Show all versions of staticanalyser Show documentation
A static design pattern verification plugin.
The newest version!
package plugin;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import tool.designpatterns.DesignPattern;
import tool.designpatterns.Pattern;
/**
* A gradle plugin -- Responsible for creating the Analyse task and making it a dependency for the
* check task.
*/
@DesignPattern(pattern = {Pattern.IMMUTABLE})
public class AnalyserPlugin implements Plugin {
public AnalyserPlugin() {
super();
}
@Override
public void apply(Project project) {
project.getTasks().create("Analyse", AnalyseTask.class);
// Make the Analyse task a dependency for the check task so that it
// is run on every build.
project.getTasksByName("check", true).forEach(task -> {
task.dependsOn("Analyse");
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy