public void apply(final ProjectInternal project) {
project.getPlugins().apply(JavaPlugin.class);
// set up a configuration named 'jpsg' for the user to specify the jpsg libs to use in case
// they want a specific version etc.
final ConfigurationContainerInternal projectConf = project.getConfigurations();
Configuration jpsgConfiguration = projectConf.create(JPSG_CONFIGURATION_NAME)
.setVisible(false).setTransitive(false)
.setDescription("The Jpsg libraries to be used for this project.");
projectConf.getByName(JavaPlugin.COMPILE_CONFIGURATION_NAME).extendsFrom(jpsgConfiguration);
project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().all(
sourceSet -> {
setupTask(project, sourceSet, Flavor.JAVA);
setupTask(project, sourceSet, Flavor.RESOURCES);