Search in sources :

Example 1 with ResolvableFileCollectionResolveContext

use of org.gradle.api.internal.file.collections.ResolvableFileCollectionResolveContext in project gradle by gradle.

the class CompositeFileCollection method getAsFileTree.

@Override
public FileTree getAsFileTree() {
    return new CompositeFileTree() {

        @Override
        public void visitContents(FileCollectionResolveContext context) {
            ResolvableFileCollectionResolveContext nested = context.newContext();
            CompositeFileCollection.this.visitContents(nested);
            context.add(nested.resolveAsFileTrees());
        }

        @Override
        public void visitDependencies(TaskDependencyResolveContext context) {
            CompositeFileCollection.this.visitDependencies(context);
        }

        @Override
        public String getDisplayName() {
            return CompositeFileCollection.this.getDisplayName();
        }
    };
}
Also used : ResolvableFileCollectionResolveContext(org.gradle.api.internal.file.collections.ResolvableFileCollectionResolveContext) BuildDependenciesOnlyFileCollectionResolveContext(org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext) FileCollectionResolveContext(org.gradle.api.internal.file.collections.FileCollectionResolveContext) DefaultFileCollectionResolveContext(org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext) ResolvableFileCollectionResolveContext(org.gradle.api.internal.file.collections.ResolvableFileCollectionResolveContext) TaskDependencyResolveContext(org.gradle.api.internal.tasks.TaskDependencyResolveContext)

Example 2 with ResolvableFileCollectionResolveContext

use of org.gradle.api.internal.file.collections.ResolvableFileCollectionResolveContext in project gradle by gradle.

the class AbstractFileCollection method getAsFileTree.

public FileTree getAsFileTree() {
    return new CompositeFileTree() {

        @Override
        public void visitContents(FileCollectionResolveContext context) {
            ResolvableFileCollectionResolveContext nested = context.newContext();
            nested.add(AbstractFileCollection.this);
            context.add(nested.resolveAsFileTrees());
        }

        @Override
        public void visitDependencies(TaskDependencyResolveContext context) {
            context.add(AbstractFileCollection.this);
        }

        @Override
        public String getDisplayName() {
            return AbstractFileCollection.this.getDisplayName();
        }
    };
}
Also used : ResolvableFileCollectionResolveContext(org.gradle.api.internal.file.collections.ResolvableFileCollectionResolveContext) FileCollectionResolveContext(org.gradle.api.internal.file.collections.FileCollectionResolveContext) ResolvableFileCollectionResolveContext(org.gradle.api.internal.file.collections.ResolvableFileCollectionResolveContext) TaskDependencyResolveContext(org.gradle.api.internal.tasks.TaskDependencyResolveContext)

Aggregations

FileCollectionResolveContext (org.gradle.api.internal.file.collections.FileCollectionResolveContext)2 ResolvableFileCollectionResolveContext (org.gradle.api.internal.file.collections.ResolvableFileCollectionResolveContext)2 TaskDependencyResolveContext (org.gradle.api.internal.tasks.TaskDependencyResolveContext)2 BuildDependenciesOnlyFileCollectionResolveContext (org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext)1 DefaultFileCollectionResolveContext (org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext)1