示例#1
0
 private void addProjectDependency(ProjectDependency dependency, String confMapping) {
   ModuleVersionIdentifier identifier = projectDependencyResolver.resolve(dependency);
   ivyDependencies.add(
       new DefaultIvyDependency(
           identifier.getGroup(),
           identifier.getName(),
           identifier.getVersion(),
           confMapping,
           dependency.isTransitive(),
           Collections.<DependencyArtifact>emptyList(),
           dependency.getExcludeRules()));
 }
 private Set<GradleLibrary> getLibrariesForFileDependencies(
     Configuration configuration, LibraryScope scope) {
   Set<GradleLibrary> libraries = new LinkedHashSet<GradleLibrary>();
   for (Dependency dependency : configuration.getIncoming().getDependencies()) {
     if (dependency instanceof FileCollectionDependency) {
       FileCollectionDependency fileDependency = (FileCollectionDependency) dependency;
       for (File file : fileDependency.resolve()) {
         libraries.add(new GradleLibrary(fileDependency.getGroup(), file, scope));
       }
     } else if (dependency instanceof ProjectDependency) {
       ProjectDependency projectDependency = (ProjectDependency) dependency;
       libraries.addAll(
           getLibrariesForFileDependencies(projectDependency.getProjectConfiguration(), scope));
     }
   }
   return libraries;
 }