use of org.gradle.plugins.ide.eclipse.model.internal.WtpClasspathAttributeSupport in project gradle by gradle.
the class EclipseWtpPlugin method configureEclipseClasspath.
private void configureEclipseClasspath(final Project project, final EclipseModel model) {
project.getPlugins().withType(JavaPlugin.class, new Action<JavaPlugin>() {
@Override
public void execute(JavaPlugin javaPlugin) {
AfterEvaluateHelper.afterEvaluateOrExecute(project, new Action<Project>() {
@Override
public void execute(Project project) {
Collection<Configuration> plusConfigurations = model.getClasspath().getPlusConfigurations();
EclipseWtpComponent component = model.getWtp().getComponent();
plusConfigurations.addAll(component.getRootConfigurations());
plusConfigurations.addAll(component.getLibConfigurations());
}
});
model.getClasspath().getFile().whenMerged(new Action<Classpath>() {
@Override
public void execute(Classpath classpath) {
new WtpClasspathAttributeSupport(project, model).enhance(classpath);
}
});
}
});
project.getPlugins().withType(WarPlugin.class, new Action<WarPlugin>() {
@Override
public void execute(WarPlugin warPlugin) {
model.getClasspath().containers(WEB_LIBS_CONTAINER);
}
});
}
Aggregations