Java 类org.gradle.api.tasks.TaskDependency 实例源码

项目:Reer    文件:DefaultConfiguration.java   
private TaskDependency doGetTaskDependency(Spec<? super Dependency> dependencySpec, AttributeContainerInternal requestedAttributes) {
    synchronized (resolutionLock) {
        if (resolutionStrategy.resolveGraphToDetermineTaskDependencies()) {
            // Force graph resolution as this is required to calculate build dependencies
            resolveToStateOrLater(GRAPH_RESOLVED);
        }
        ResolverResults results;
        if (getState() == State.UNRESOLVED) {
            // Traverse graph
            results = new DefaultResolverResults();
            resolver.resolveBuildDependencies(this, results);
        } else {
            // Otherwise, already have a result, so reuse it
            results = cachedResolverResults;
        }
        List<Object> buildDependencies = new ArrayList<Object>();
        results.getVisitedArtifacts().select(dependencySpec, requestedAttributes).collectBuildDependencies(buildDependencies);
        return TaskDependencies.of(buildDependencies);
    }
}
项目:Reer    文件:CachingTaskDependencyResolveContext.java   
public void getNodeValues(Object node, Collection<? super Task> values, Collection<? super Object> connectedNodes) {
    if (node instanceof TaskDependencyContainer) {
        TaskDependencyContainer taskDependency = (TaskDependencyContainer) node;
        queue.clear();
        taskDependency.visitDependencies(CachingTaskDependencyResolveContext.this);
        connectedNodes.addAll(queue);
    } else if (node instanceof Buildable) {
        Buildable buildable = (Buildable) node;
        connectedNodes.add(buildable.getBuildDependencies());
    } else if (node instanceof TaskDependency) {
        TaskDependency dependency = (TaskDependency) node;
        values.addAll(dependency.getDependencies(task));
    } else if (node instanceof Task) {
        values.add((Task) node);
    } else {
        throw new IllegalArgumentException(String.format("Cannot resolve object of unknown type %s to a Task.",
                node.getClass().getSimpleName()));
    }
}
项目:Reer    文件:DefaultFileCollectionResolveContext.java   
public void convertInto(Object element, Collection<? super FileCollectionInternal> result, PathToFileResolver fileResolver) {
    if (element instanceof DefaultFileCollectionResolveContext) {
        DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
        result.addAll(nestedContext.resolveAsFileCollections());
    } else if (element instanceof FileCollection) {
        FileCollection fileCollection = (FileCollection) element;
        result.add(Cast.cast(FileCollectionInternal.class, fileCollection));
    } else if (element instanceof MinimalFileTree) {
        MinimalFileTree fileTree = (MinimalFileTree) element;
        result.add(new FileTreeAdapter(fileTree));
    } else if (element instanceof MinimalFileSet) {
        MinimalFileSet fileSet = (MinimalFileSet) element;
        result.add(new FileCollectionAdapter(fileSet));
    } else if (element instanceof MinimalFileCollection) {
        throw new UnsupportedOperationException(String.format("Cannot convert instance of %s to FileTree", element.getClass().getSimpleName()));
    } else if (element instanceof TaskDependency) {
        // Ignore
        return;
    } else {
        result.add(new FileCollectionAdapter(new ListBackedFileSet(fileResolver.resolve(element))));
    }
}
项目:Reer    文件:DefaultFileCollectionResolveContext.java   
public void convertInto(Object element, Collection<? super MinimalFileCollection> result, PathToFileResolver resolver) {
    if (element instanceof DefaultFileCollectionResolveContext) {
        DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
        result.addAll(nestedContext.resolveAsMinimalFileCollections());
    } else if (element instanceof MinimalFileCollection) {
        MinimalFileCollection collection = (MinimalFileCollection) element;
        result.add(collection);
    } else if (element instanceof FileCollection) {
        throw new UnsupportedOperationException(String.format("Cannot convert instance of %s to MinimalFileCollection", element.getClass().getSimpleName()));
    } else if (element instanceof TaskDependency) {
        // Ignore
        return;
    } else {
        result.add(new ListBackedFileSet(resolver.resolve(element)));
    }
}
项目:Reer    文件:AbstractFileCollection.java   
public FileCollection minus(final FileCollection collection) {
    return new AbstractFileCollection() {
        @Override
        public String getDisplayName() {
            return AbstractFileCollection.this.getDisplayName();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return AbstractFileCollection.this.getBuildDependencies();
        }

        public Set<File> getFiles() {
            Set<File> files = new LinkedHashSet<File>(AbstractFileCollection.this.getFiles());
            files.removeAll(collection.getFiles());
            return files;
        }
    };
}
项目:Reer    文件:AbstractFileCollection.java   
public FileCollection filter(final Spec<? super File> filterSpec) {
    return new AbstractFileCollection() {
        @Override
        public String getDisplayName() {
            return AbstractFileCollection.this.getDisplayName();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return AbstractFileCollection.this.getBuildDependencies();
        }

        public Set<File> getFiles() {
            return CollectionUtils.filter(AbstractFileCollection.this, new LinkedHashSet<File>(), filterSpec);
        }
    };
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepackagePluginFeatures.java   
private void addRepackageTask(Project project) {
    RepackageTask task = project.getTasks().create(REPACKAGE_TASK_NAME,
            RepackageTask.class);
    task.setDescription("Repackage existing JAR and WAR "
            + "archives so that they can be executed from the command "
            + "line using 'java -jar'");
    task.setGroup(BasePlugin.BUILD_GROUP);
    Configuration runtimeConfiguration = project.getConfigurations()
            .getByName(JavaPlugin.RUNTIME_CONFIGURATION_NAME);
    TaskDependency runtimeProjectDependencyJarTasks = runtimeConfiguration
            .getTaskDependencyFromProjectDependency(true, JavaPlugin.JAR_TASK_NAME);
    task.dependsOn(
            project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION)
                    .getAllArtifacts().getBuildDependencies(),
            runtimeProjectDependencyJarTasks);
    registerOutput(project, task);
    ensureTaskRunsOnAssembly(project, task);
    ensureMainClassHasBeenFound(project, task);
}
项目:spring-boot-concourse    文件:RepackagePluginFeatures.java   
private void addRepackageTask(Project project) {
    RepackageTask task = project.getTasks().create(REPACKAGE_TASK_NAME,
            RepackageTask.class);
    task.setDescription("Repackage existing JAR and WAR "
            + "archives so that they can be executed from the command "
            + "line using 'java -jar'");
    task.setGroup(BasePlugin.BUILD_GROUP);
    Configuration runtimeConfiguration = project.getConfigurations()
            .getByName(JavaPlugin.RUNTIME_CONFIGURATION_NAME);
    TaskDependency runtimeProjectDependencyJarTasks = runtimeConfiguration
            .getTaskDependencyFromProjectDependency(true, JavaPlugin.JAR_TASK_NAME);
    task.dependsOn(
            project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION)
                    .getAllArtifacts().getBuildDependencies(),
            runtimeProjectDependencyJarTasks);
    registerOutput(project, task);
    ensureTaskRunsOnAssembly(project, task);
    ensureMainClassHasBeenFound(project, task);
}
项目:contestparser    文件:RepackagePluginFeatures.java   
private void addRepackageTask(Project project) {
    RepackageTask task = project.getTasks().create(REPACKAGE_TASK_NAME,
            RepackageTask.class);
    task.setDescription("Repackage existing JAR and WAR "
            + "archives so that they can be executed from the command "
            + "line using 'java -jar'");
    task.setGroup(BasePlugin.BUILD_GROUP);
    Configuration runtimeConfiguration = project.getConfigurations()
            .getByName(JavaPlugin.RUNTIME_CONFIGURATION_NAME);
    TaskDependency runtimeProjectDependencyJarTasks = runtimeConfiguration
            .getTaskDependencyFromProjectDependency(true, JavaPlugin.JAR_TASK_NAME);
    task.dependsOn(
            project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION)
                    .getAllArtifacts().getBuildDependencies(),
            runtimeProjectDependencyJarTasks);
    registerOutput(project, task);
    ensureTaskRunsOnAssembly(project, task);
    ensureMainClassHasBeenFound(project, task);
}
项目:Pushjet-Android    文件:SourceSetNativeDependencyResolver.java   
public FileCollection getIncludeRoots() {
    return new AbstractFileCollection() {
        @Override
        public String getDisplayName() {
            return "Include roots of " + sourceSet.getName();
        }

        public Set<File> getFiles() {
            return sourceSet.getExportedHeaders().getSrcDirs();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return sourceSet.getBuildDependencies();
        }
    };
}
项目:Pushjet-Android    文件:CachingTaskDependencyResolveContext.java   
public void getNodeValues(Object node, Collection<? super Task> values, Collection<? super Object> connectedNodes) {
    if (node instanceof TaskDependencyInternal) {
        TaskDependencyInternal taskDependency = (TaskDependencyInternal) node;
        queue.clear();
        taskDependency.resolve(CachingTaskDependencyResolveContext.this);
        connectedNodes.addAll(queue);
    } else if (node instanceof Buildable) {
        Buildable buildable = (Buildable) node;
        connectedNodes.add(buildable.getBuildDependencies());
    } else if (node instanceof TaskDependency) {
        TaskDependency dependency = (TaskDependency) node;
        values.addAll(dependency.getDependencies(task));
    } else if (node instanceof Task) {
        values.add((Task) node);
    } else {
        throw new IllegalArgumentException(String.format("Cannot resolve object of unknown type %s to a Task.",
                node.getClass().getSimpleName()));
    }
}
项目:Pushjet-Android    文件:FileCollectionBackedArchiveTextResource.java   
public FileCollectionBackedArchiveTextResource(final FileOperations fileOperations,
                                               final TemporaryFileProvider tempFileProvider,
                                               final FileCollection fileCollection,
                                               final String path, Charset charset) {
    super(tempFileProvider, new LazilyInitializedFileTree() {
        @Override
        public FileTree createDelegate() {
            File archiveFile = fileCollection.getSingleFile();
            String fileExtension = Files.getFileExtension(archiveFile.getName());
            FileTree archiveContents = fileExtension.equals("jar") || fileExtension.equals("zip")
                    ? fileOperations.zipTree(archiveFile) : fileOperations.tarTree(archiveFile);
            PatternSet patternSet = new PatternSet();
            patternSet.include(path);
            return archiveContents.matching(patternSet);
        }
        public TaskDependency getBuildDependencies() {
            return fileCollection.getBuildDependencies();
        }
    }, charset);
}
项目:Pushjet-Android    文件:CompositeFileCollection.java   
@Override
public FileCollection filter(final Spec<? super File> filterSpec) {
    return new CompositeFileCollection() {
        @Override
        public void resolve(FileCollectionResolveContext context) {
            for (FileCollection collection : CompositeFileCollection.this.getSourceCollections()) {
                context.add(collection.filter(filterSpec));
            }
        }

        @Override
        public String getDisplayName() {
            return CompositeFileCollection.this.getDisplayName();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return CompositeFileCollection.this.getBuildDependencies();
        }
    };
}
项目:Pushjet-Android    文件:DefaultFileCollectionResolveContext.java   
public void convertInto(Object element, Collection<? super FileCollection> result, FileResolver fileResolver) {
    if (element instanceof DefaultFileCollectionResolveContext) {
        DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
        result.addAll(nestedContext.resolveAsFileCollections());
    } else if (element instanceof FileCollection) {
        FileCollection fileCollection = (FileCollection) element;
        result.add(fileCollection);
    } else if (element instanceof MinimalFileTree) {
        MinimalFileTree fileTree = (MinimalFileTree) element;
        result.add(new FileTreeAdapter(fileTree));
    } else if (element instanceof MinimalFileSet) {
        MinimalFileSet fileSet = (MinimalFileSet) element;
        result.add(new FileCollectionAdapter(fileSet));
    } else if (element instanceof MinimalFileCollection) {
        throw new UnsupportedOperationException(String.format("Cannot convert instance of %s to FileTree", element.getClass().getSimpleName()));
    } else if (element instanceof TaskDependency) {
        // Ignore
        return;
    } else {
        result.add(new FileCollectionAdapter(new ListBackedFileSet(fileResolver.resolve(element))));
    }
}
项目:Pushjet-Android    文件:DefaultFileCollectionResolveContext.java   
public void convertInto(Object element, Collection<? super MinimalFileCollection> result, FileResolver resolver) {
    if (element instanceof DefaultFileCollectionResolveContext) {
        DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
        result.addAll(nestedContext.resolveAsMinimalFileCollections());
    } else if (element instanceof MinimalFileCollection) {
        MinimalFileCollection collection = (MinimalFileCollection) element;
        result.add(collection);
    } else if (element instanceof FileCollection) {
        throw new UnsupportedOperationException(String.format("Cannot convert instance of %s to MinimalFileCollection", element.getClass().getSimpleName()));
    } else if (element instanceof TaskDependency) {
        // Ignore
        return;
    } else {
        result.add(new ListBackedFileSet(resolver.resolve(element)));
    }
}
项目:Pushjet-Android    文件:AbstractFileCollection.java   
public FileCollection minus(final FileCollection collection) {
    return new AbstractFileCollection() {
        @Override
        public String getDisplayName() {
            return AbstractFileCollection.this.getDisplayName();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return AbstractFileCollection.this.getBuildDependencies();
        }

        public Set<File> getFiles() {
            Set<File> files = new LinkedHashSet<File>(AbstractFileCollection.this.getFiles());
            files.removeAll(collection.getFiles());
            return files;
        }
    };
}
项目:Pushjet-Android    文件:AbstractFileCollection.java   
public FileCollection filter(final Spec<? super File> filterSpec) {
    return new AbstractFileCollection() {
        @Override
        public String getDisplayName() {
            return AbstractFileCollection.this.getDisplayName();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return AbstractFileCollection.this.getBuildDependencies();
        }

        public Set<File> getFiles() {
            return CollectionUtils.filter(AbstractFileCollection.this, new LinkedHashSet<File>(), filterSpec);
        }
    };
}
项目:Pushjet-Android    文件:SourceSetNativeDependencyResolver.java   
public FileCollection getIncludeRoots() {
    return new AbstractFileCollection() {
        @Override
        public String getDisplayName() {
            return "Include roots of " + sourceSet.getName();
        }

        public Set<File> getFiles() {
            return sourceSet.getExportedHeaders().getSrcDirs();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return sourceSet.getBuildDependencies();
        }
    };
}
项目:Pushjet-Android    文件:CachingTaskDependencyResolveContext.java   
public void getNodeValues(Object node, Collection<? super Task> values, Collection<? super Object> connectedNodes) {
    if (node instanceof TaskDependencyInternal) {
        TaskDependencyInternal taskDependency = (TaskDependencyInternal) node;
        queue.clear();
        taskDependency.resolve(CachingTaskDependencyResolveContext.this);
        connectedNodes.addAll(queue);
    } else if (node instanceof Buildable) {
        Buildable buildable = (Buildable) node;
        connectedNodes.add(buildable.getBuildDependencies());
    } else if (node instanceof TaskDependency) {
        TaskDependency dependency = (TaskDependency) node;
        values.addAll(dependency.getDependencies(task));
    } else if (node instanceof Task) {
        values.add((Task) node);
    } else {
        throw new IllegalArgumentException(String.format("Cannot resolve object of unknown type %s to a Task.",
                node.getClass().getSimpleName()));
    }
}
项目:Pushjet-Android    文件:CompositeFileCollection.java   
@Override
public FileCollection filter(final Spec<? super File> filterSpec) {
    return new CompositeFileCollection() {
        @Override
        public void resolve(FileCollectionResolveContext context) {
            for (FileCollection collection : CompositeFileCollection.this.getSourceCollections()) {
                context.add(collection.filter(filterSpec));
            }
        }

        @Override
        public String getDisplayName() {
            return CompositeFileCollection.this.getDisplayName();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return CompositeFileCollection.this.getBuildDependencies();
        }
    };
}
项目:Pushjet-Android    文件:DefaultFileCollectionResolveContext.java   
public void convertInto(Object element, Collection<? super FileCollection> result, FileResolver fileResolver) {
    if (element instanceof DefaultFileCollectionResolveContext) {
        DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
        result.addAll(nestedContext.resolveAsFileCollections());
    } else if (element instanceof FileCollection) {
        FileCollection fileCollection = (FileCollection) element;
        result.add(fileCollection);
    } else if (element instanceof MinimalFileTree) {
        MinimalFileTree fileTree = (MinimalFileTree) element;
        result.add(new FileTreeAdapter(fileTree));
    } else if (element instanceof MinimalFileSet) {
        MinimalFileSet fileSet = (MinimalFileSet) element;
        result.add(new FileCollectionAdapter(fileSet));
    } else if (element instanceof MinimalFileCollection) {
        throw new UnsupportedOperationException(String.format("Cannot convert instance of %s to FileTree", element.getClass().getSimpleName()));
    } else if (element instanceof TaskDependency) {
        // Ignore
        return;
    } else {
        result.add(new FileCollectionAdapter(new ListBackedFileSet(fileResolver.resolve(element))));
    }
}
项目:Pushjet-Android    文件:DefaultFileCollectionResolveContext.java   
public void convertInto(Object element, Collection<? super MinimalFileCollection> result, FileResolver resolver) {
    if (element instanceof DefaultFileCollectionResolveContext) {
        DefaultFileCollectionResolveContext nestedContext = (DefaultFileCollectionResolveContext) element;
        result.addAll(nestedContext.resolveAsMinimalFileCollections());
    } else if (element instanceof MinimalFileCollection) {
        MinimalFileCollection collection = (MinimalFileCollection) element;
        result.add(collection);
    } else if (element instanceof FileCollection) {
        throw new UnsupportedOperationException(String.format("Cannot convert instance of %s to MinimalFileCollection", element.getClass().getSimpleName()));
    } else if (element instanceof TaskDependency) {
        // Ignore
        return;
    } else {
        result.add(new ListBackedFileSet(resolver.resolve(element)));
    }
}
项目:Pushjet-Android    文件:AbstractFileCollection.java   
public FileCollection minus(final FileCollection collection) {
    return new AbstractFileCollection() {
        @Override
        public String getDisplayName() {
            return AbstractFileCollection.this.getDisplayName();
        }

        @Override
        public TaskDependency getBuildDependencies() {
            return AbstractFileCollection.this.getBuildDependencies();
        }

        public Set<File> getFiles() {
            Set<File> files = new LinkedHashSet<File>(AbstractFileCollection.this.getFiles());
            files.removeAll(collection.getFiles());
            return files;
        }
    };
}
项目:Reer    文件:DependencyResolvingClasspath.java   
@Override
public TaskDependency getBuildDependencies() {
    ensureResolved(false);

    List<TaskDependency> taskDependencies = new ArrayList<TaskDependency>();
    resolveResult.artifactsResults.getArtifacts().collectBuildDependencies(taskDependencies);
    return TaskDependencies.of(taskDependencies);
}
项目:Reer    文件:AbstractBuildableComponentSpec.java   
@Override
public TaskDependency getBuildDependencies() {
    return new TaskDependency() {
        public Set<? extends Task> getDependencies(Task other) {
            if (buildTask == null) {
                return buildTaskDependencies.getDependencies(other);
            }
            return Collections.singleton(buildTask);
        }
    };
}
项目:Reer    文件:DefaultResolvedArtifact.java   
public DefaultResolvedArtifact(ModuleVersionIdentifier owner, IvyArtifactName artifact, ComponentArtifactIdentifier artifactId, TaskDependency buildDependencies, Factory<File> artifactSource) {
    this.owner = owner;
    this.artifact = artifact;
    this.artifactId = artifactId;
    this.buildDependencies = buildDependencies;
    this.artifactSource = artifactSource;
    this.attributes = DefaultArtifactAttributes.forIvyArtifactName(artifact);
}
项目:Reer    文件:DefaultResolvedArtifact.java   
public DefaultResolvedArtifact(ModuleVersionIdentifier owner, IvyArtifactName artifact, ComponentArtifactIdentifier artifactId, TaskDependency buildDependencies, File artifactFile) {
    this.owner = owner;
    this.artifact = artifact;
    this.artifactId = artifactId;
    this.buildDependencies = buildDependencies;
    this.attributes = DefaultArtifactAttributes.forIvyArtifactName(artifact);
    this.file = artifactFile;
}
项目:Reer    文件:DefaultConfiguration.java   
/**
 * {@inheritDoc}
 */
public TaskDependency getTaskDependencyFromProjectDependency(final boolean useDependedOn, final String taskName) {
    if (useDependedOn) {
        return new TasksFromProjectDependencies(taskName, getAllDependencies(), projectAccessListener);
    } else {
        return new TasksFromDependentProjects(taskName, getName());
    }
}
项目:Reer    文件:AbstractNativeLibraryBinarySpec.java   
@Override
public final TaskDependency getBuildDependencies() {
    if (hasOutputs()) {
        return AbstractNativeLibraryBinarySpec.this.getBuildDependencies();
    }
    return TaskDependencies.EMPTY;
}
项目:Reer    文件:AbstractNativeLibraryBinarySpec.java   
@Override
public TaskDependency getBuildDependencies() {
    DefaultTaskDependency dependency = new DefaultTaskDependency();
    for (HeaderExportingSourceSet sourceSet : getInputs().withType(HeaderExportingSourceSet.class)) {
        dependency.add(sourceSet.getBuildDependencies());
    }
    return dependency;
}
项目:Reer    文件:CharSourceBackedTextResource.java   
@Override
public TaskDependency getBuildDependencies() {
    return new TaskDependency() {
        @Override
        public Set<? extends Task> getDependencies(Task task) {
            return Collections.emptySet();
        }
    };
}
项目:Reer    文件:AbstractTask.java   
public boolean dependsOnTaskDidWork() {
    TaskDependency dependency = getTaskDependencies();
    for (Task depTask : dependency.getDependencies(this)) {
        if (depTask.getDidWork()) {
            return true;
        }
    }
    return false;
}
项目:Reer    文件:AbstractTask.java   
public TaskDependency shouldRunAfter(final Object... paths) {
    taskMutator.mutate("Task.shouldRunAfter(Object...)", new Runnable() {
        public void run() {
            shouldRunAfter.add(paths);
        }
    });
    return shouldRunAfter;
}
项目:Reer    文件:CompositeFileCollection.java   
@Override
public final TaskDependency getBuildDependencies() {
    return new AbstractTaskDependency() {
        @Override
        public String toString() {
            return CompositeFileCollection.this.toString() + " dependencies";
        }

        public void visitDependencies(TaskDependencyResolveContext context) {
            CompositeFileCollection.this.visitDependencies(context);
        }
    };
}
项目:Reer    文件:FileTreeAdapter.java   
@Override
public TaskDependency getBuildDependencies() {
    if (tree instanceof Buildable) {
        Buildable buildable = (Buildable) tree;
        return buildable.getBuildDependencies();
    }
    return super.getBuildDependencies();
}
项目:Reer    文件:FileCollectionAdapter.java   
@Override
public TaskDependency getBuildDependencies() {
    if (fileCollection instanceof Buildable) {
        Buildable buildable = (Buildable) fileCollection;
        return buildable.getBuildDependencies();
    }
    return super.getBuildDependencies();
}
项目:Reer    文件:DefaultFileCollectionFactory.java   
@Override
public FileCollection create(final TaskDependency builtBy, MinimalFileSet contents) {
    if (contents instanceof Buildable) {
        throw new UnsupportedOperationException("Not implemented yet.");
    }
    return new FileCollectionAdapter(contents) {
        @Override
        public TaskDependency getBuildDependencies() {
            return builtBy;
        }
    };
}
项目:Reer    文件:DefaultJavaSourceSet.java   
public TaskDependency getBuildDependencies() {
    return new TaskDependency() {
        public Set<? extends Task> getDependencies(Task task) {
            Set<Task> dependencies = new HashSet<Task>();
            dependencies.addAll(compileClasspath.getBuildDependencies().getDependencies(task));
            dependencies.addAll(getSource().getBuildDependencies().getDependencies(task));
            return dependencies;
        }
    };
}
项目:Pushjet-Android    文件:DefaultConfiguration.java   
/**
 * {@inheritDoc}
 */
public TaskDependency getTaskDependencyFromProjectDependency(final boolean useDependedOn, final String taskName) {
    if (useDependedOn) {
        return new TasksFromProjectDependencies(taskName, getAllDependencies());
    } else {
        return new TasksFromDependentProjects(taskName, getName());
    }
}
项目:Pushjet-Android    文件:DefaultJavaSourceSet.java   
public TaskDependency getBuildDependencies() {
    return new TaskDependency() {
        public Set<? extends Task> getDependencies(Task task) {
            Set<Task> dependencies = new HashSet<Task>();
            dependencies.addAll(compileClasspath.getBuildDependencies().getDependencies(task));
            dependencies.addAll(getSource().getBuildDependencies().getDependencies(task));
            return dependencies;
        }
    };
}