Search in sources :

Example 1 with Variable

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

the class EclipseDependenciesCreator method createLibraryEntry.

private static AbstractLibrary createLibraryEntry(File binary, File source, File javadoc, EclipseClasspath classpath, ModuleVersionIdentifier id) {
    FileReferenceFactory referenceFactory = classpath.getFileReferenceFactory();
    FileReference binaryRef = referenceFactory.fromFile(binary);
    FileReference sourceRef = referenceFactory.fromFile(source);
    FileReference javadocRef = referenceFactory.fromFile(javadoc);
    final AbstractLibrary out = binaryRef.isRelativeToPathVariable() ? new Variable(binaryRef) : new Library(binaryRef);
    out.setJavadocPath(javadocRef);
    out.setSourcePath(sourceRef);
    out.setExported(false);
    out.setModuleVersion(id);
    return out;
}
Also used : Variable(org.gradle.plugins.ide.eclipse.model.Variable) AbstractLibrary(org.gradle.plugins.ide.eclipse.model.AbstractLibrary) Library(org.gradle.plugins.ide.eclipse.model.Library) AbstractLibrary(org.gradle.plugins.ide.eclipse.model.AbstractLibrary) FileReference(org.gradle.plugins.ide.eclipse.model.FileReference)

Aggregations

AbstractLibrary (org.gradle.plugins.ide.eclipse.model.AbstractLibrary)1 FileReference (org.gradle.plugins.ide.eclipse.model.FileReference)1 Library (org.gradle.plugins.ide.eclipse.model.Library)1 Variable (org.gradle.plugins.ide.eclipse.model.Variable)1