make check task dependsOn validatePlugins task
@@ -3,6 +3,8 @@ package org.shipkit.internal.gradle.plugin;
import org.gradle.api.Action;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
+import org.gradle.api.Task;
+import org.gradle.api.plugins.JavaBasePlugin;
import org.shipkit.gradle.plugin.PluginValidatorTask;
import org.shipkit.internal.gradle.util.JavaPluginUtil;
import org.shipkit.internal.gradle.util.TaskMaker;
@@ -25,13 +27,16 @@ public class PluginValidationPlugin implements Plugin<Project> {
project.getPlugins().withId("java", new Action<Plugin>() {
@Override
public void execute(Plugin plugin) {
- TaskMaker.task(project, VALIDATE_PLUGINS, PluginValidatorTask.class, new Action<PluginValidatorTask>() {
+ final Task task = TaskMaker.task(project, VALIDATE_PLUGINS, PluginValidatorTask.class, new Action<PluginValidatorTask>() {
@Override
public void execute(PluginValidatorTask task) {
task.setDescription("Validates Gradle Plugins and their properties files");
task.setSourceSet(JavaPluginUtil.getMainSourceSet(project));
}
});
+
+ final Task check = project.getTasks().getByName(JavaBasePlugin.CHECK_TASK_NAME);
+ check.dependsOn(task);
}
});
}
