@Test public void compileJavaDependsOnCompileJavaccAfterExecutionWhenJavaPluginApplied() { applyJavaccPluginToProject(); applyJavaPluginToProject(); JavaToJavaccDependencyAction action = new JavaToJavaccDependencyAction(); action.execute(project); TaskCollection<JavaCompile> javaCompilationTasks = project.getTasks().withType(JavaCompile.class); for (JavaCompile task : javaCompilationTasks) { Set<Object> dependencies = task.getDependsOn(); assertTrue(dependencies.contains(project.getTasks().findByName(CompileJavaccTask.TASK_NAME_VALUE))); } }
@Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); }
JavaToJavaccDependencyAction implements Action<Project> { @Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); } }
JavaToJavaccDependencyAction implements Action<Project> { @Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); }  }
JavaToJavaccDependencyAction implements Action<Project> { @Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); }  @Override void execute(Project project); }
JavaToJavaccDependencyAction implements Action<Project> { @Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); }  @Override void execute(Project project);  }