@Mutate
public void createCUnitLauncherTasks(TaskContainer tasks, TestSuiteContainer testSuites, ProjectSourceSet sources) {
for (final CUnitTestSuiteSpec suite : testSuites.withType(CUnitTestSuiteSpec.class)) {
String taskName = suite.getName() + "CUnitLauncher";
GenerateCUnitLauncher skeletonTask = tasks.create(taskName, GenerateCUnitLauncher.class);
CSourceSet launcherSources = findLaucherSources(suite);
skeletonTask.setSourceDir(launcherSources.getSource().getSrcDirs().iterator().next());
skeletonTask.setHeaderDir(launcherSources.getExportedHeaders().getSrcDirs().iterator().next());
launcherSources.builtBy(skeletonTask);
}
}