Search in sources :

Example 1 with AbstractClasspathEntry

use of org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry in project gradle by gradle.

the class WtpClasspathAttributeSupport method enhance.

public void enhance(Classpath classpath) {
    for (ClasspathEntry entry : classpath.getEntries()) {
        if (entry instanceof AbstractClasspathEntry) {
            AbstractClasspathEntry classpathEntry = (AbstractClasspathEntry) entry;
            Map<String, Object> wtpEntries = createDeploymentAttribute(classpathEntry);
            classpathEntry.getEntryAttributes().putAll(wtpEntries);
        }
    }
}
Also used : AbstractClasspathEntry(org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry) ClasspathEntry(org.gradle.plugins.ide.eclipse.model.ClasspathEntry) AbstractClasspathEntry(org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry)

Example 2 with AbstractClasspathEntry

use of org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry in project gradle by gradle.

the class EclipseDependenciesCreator method createProjectDependencies.

private List<AbstractClasspathEntry> createProjectDependencies() {
    ArrayList<AbstractClasspathEntry> projects = Lists.newArrayList();
    Collection<IdeProjectDependency> projectDependencies = dependenciesExtractor.extractProjectDependencies(classpath.getProject(), classpath.getPlusConfigurations(), classpath.getMinusConfigurations());
    for (IdeProjectDependency projectDependency : projectDependencies) {
        projects.add(projectDependencyBuilder.build(projectDependency));
    }
    return projects;
}
Also used : IdeProjectDependency(org.gradle.plugins.ide.internal.resolver.model.IdeProjectDependency) AbstractClasspathEntry(org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry)

Example 3 with AbstractClasspathEntry

use of org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry in project gradle by gradle.

the class EclipseDependenciesCreator method createLibraryDependencies.

private List<AbstractClasspathEntry> createLibraryDependencies() {
    ArrayList<AbstractClasspathEntry> libraries = Lists.newArrayList();
    boolean downloadSources = classpath.isDownloadSources();
    boolean downloadJavadoc = classpath.isDownloadJavadoc();
    Collection<IdeExtendedRepoFileDependency> repoFileDependencies = dependenciesExtractor.extractRepoFileDependencies(classpath.getProject().getDependencies(), classpath.getPlusConfigurations(), classpath.getMinusConfigurations(), downloadSources, downloadJavadoc);
    for (IdeExtendedRepoFileDependency dependency : repoFileDependencies) {
        libraries.add(createLibraryEntry(dependency.getFile(), dependency.getSourceFile(), dependency.getJavadocFile(), classpath, dependency.getId()));
    }
    Collection<IdeLocalFileDependency> localFileDependencies = dependenciesExtractor.extractLocalFileDependencies(classpath.getPlusConfigurations(), classpath.getMinusConfigurations());
    for (IdeLocalFileDependency it : localFileDependencies) {
        libraries.add(createLibraryEntry(it.getFile(), null, null, classpath, null));
    }
    return libraries;
}
Also used : IdeLocalFileDependency(org.gradle.plugins.ide.internal.resolver.model.IdeLocalFileDependency) IdeExtendedRepoFileDependency(org.gradle.plugins.ide.internal.resolver.model.IdeExtendedRepoFileDependency) AbstractClasspathEntry(org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry)

Aggregations

AbstractClasspathEntry (org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry)3 ClasspathEntry (org.gradle.plugins.ide.eclipse.model.ClasspathEntry)1 IdeExtendedRepoFileDependency (org.gradle.plugins.ide.internal.resolver.model.IdeExtendedRepoFileDependency)1 IdeLocalFileDependency (org.gradle.plugins.ide.internal.resolver.model.IdeLocalFileDependency)1 IdeProjectDependency (org.gradle.plugins.ide.internal.resolver.model.IdeProjectDependency)1