configureTask( project );
project.getLogger().debug( String.format( "DAG has been configured with enhance task dependent on [%s].", JavaPlugin.CLASSES_TASK_NAME ) );
}
private void configureTask(Project project) {
EnhanceTask enhanceTask = project.getTasks().create( ENHANCE_TASK_NAME, EnhanceTask.class );
enhanceTask.setGroup(BasePlugin.BUILD_GROUP);
// connect up the task in the task dependency graph
Task classesTask = project.getTasks().getByName( JavaPlugin.CLASSES_TASK_NAME );
enhanceTask.dependsOn( classesTask );
Task jarTask = project.getTasks().getByName( HAPPENS_AFTER_ENHANCE_TASK_NAME );
jarTask.dependsOn( enhanceTask );
}