org.gradle.api.tasks.util.PatternFilterable Java Examples

The following examples show how to use org.gradle.api.tasks.util.PatternFilterable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultScalaJavaJointCompiler.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public WorkResult execute(ScalaJavaJointCompileSpec spec) {
    scalaCompiler.execute(spec);

    PatternFilterable patternSet = new PatternSet();
    patternSet.include("**/*.java");
    FileTree javaSource = spec.getSource().getAsFileTree().matching(patternSet);
    if (!javaSource.isEmpty()) {
        spec.setSource(javaSource);
        javaCompiler.execute(spec);
    }

    return new WorkResult() {
        public boolean getDidWork() {
            return true;
        }
    };
}
 
Example #2
Source File: DefaultScalaJavaJointCompiler.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public WorkResult execute(ScalaJavaJointCompileSpec spec) {
    scalaCompiler.execute(spec);

    PatternFilterable patternSet = new PatternSet();
    patternSet.include("**/*.java");
    FileTree javaSource = spec.getSource().getAsFileTree().matching(patternSet);
    if (!javaSource.isEmpty()) {
        spec.setSource(javaSource);
        javaCompiler.execute(spec);
    }

    return new WorkResult() {
        public boolean getDidWork() {
            return true;
        }
    };
}
 
Example #3
Source File: DefaultScalaJavaJointCompiler.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public WorkResult execute(ScalaJavaJointCompileSpec spec) {
    scalaCompiler.execute(spec);

    PatternFilterable patternSet = new PatternSet();
    patternSet.include("**/*.java");
    FileTree javaSource = spec.getSource().getAsFileTree().matching(patternSet);
    if (!javaSource.isEmpty()) {
        spec.setSource(javaSource);
        javaCompiler.execute(spec);
    }

    return new WorkResult() {
        public boolean getDidWork() {
            return true;
        }
    };
}
 
Example #4
Source File: FileTreeAdapter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public FileTree matching(PatternFilterable patterns) {
    if (tree instanceof PatternFilterableFileTree) {
        PatternFilterableFileTree filterableTree = (PatternFilterableFileTree) tree;
        return new FileTreeAdapter(filterableTree.filter(patterns));
    }
    return super.matching(patterns);
}
 
Example #5
Source File: FileTreeAdapter.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Override
public FileTree matching(PatternFilterable patterns) {
    if (tree instanceof PatternFilterableFileTree) {
        PatternFilterableFileTree filterableTree = (PatternFilterableFileTree) tree;
        return new FileTreeAdapter(filterableTree.filter(patterns));
    }
    return super.matching(patterns);
}
 
Example #6
Source File: GitPublishReset.java    From gradle-git-publish with Apache License 2.0 4 votes vote down vote up
public void setPreserve(PatternFilterable preserve) {
  this.preserve = preserve;
}
 
Example #7
Source File: DirectoryFileTree.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DirectoryFileTree filter(PatternFilterable patterns) {
    PatternSet patternSet = this.patternSet.intersect();
    patternSet.copyFrom(patterns);
    return new DirectoryFileTree(dir, patternSet);
}
 
Example #8
Source File: GitPublishExtension.java    From gradle-git-publish with Apache License 2.0 4 votes vote down vote up
public PatternFilterable getPreserve() {
  return preserve;
}
 
Example #9
Source File: AbstractFileTree.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public FileTree matching(PatternFilterable patterns) {
    PatternSet patternSet = new PatternSet();
    patternSet.copyFrom(patterns);
    return new FilteredFileTree(this, patternSet.getAsSpec());
}
 
Example #10
Source File: DefaultSourceDirectorySet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PatternFilterable exclude(Spec<FileTreeElement> excludeSpec) {
    patterns.exclude(excludeSpec);
    return this;
}
 
Example #11
Source File: DefaultSourceDirectorySet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PatternFilterable exclude(Closure excludeSpec) {
    patterns.exclude(excludeSpec);
    return this;
}
 
Example #12
Source File: DefaultSourceDirectorySet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PatternFilterable getFilter() {
    return filter;
}
 
Example #13
Source File: CompositeFileTree.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public FileTree matching(PatternFilterable patterns) {
    return new FilteredFileTree(patterns);
}
 
Example #14
Source File: DefaultSourceDirectorySet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PatternFilterable setExcludes(Iterable<String> excludes) {
    patterns.setExcludes(excludes);
    return this;
}
 
Example #15
Source File: DefaultSourceDirectorySet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PatternFilterable include(Iterable<String> includes) {
    patterns.include(includes);
    return this;
}
 
Example #16
Source File: DefaultSourceDirectorySet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PatternFilterable exclude(String... excludes) {
    patterns.exclude(excludes);
    return this;
}
 
Example #17
Source File: DirectoryFileTree.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DirectoryFileTree filter(PatternFilterable patterns) {
    PatternSet patternSet = this.patternSet.intersect();
    patternSet.copyFrom(patterns);
    return new DirectoryFileTree(dir, patternSet);
}
 
Example #18
Source File: GitPublishReset.java    From gradle-git-publish with Apache License 2.0 4 votes vote down vote up
@Internal
public PatternFilterable getPreserve() {
  return preserve;
}
 
Example #19
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable exclude(Closure excludeSpec) {
    filter.exclude(excludeSpec);
    return this;
}
 
Example #20
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable exclude(Spec<FileTreeElement> excludeSpec) {
    filter.exclude(excludeSpec);
    return this;
}
 
Example #21
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable exclude(String... excludes) {
    filter.exclude(excludes);
    return this;
}
 
Example #22
Source File: DefaultSourceDirectorySet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PatternFilterable include(Spec<FileTreeElement> includeSpec) {
    patterns.include(includeSpec);
    return this;
}
 
Example #23
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable include(Closure includeSpec) {
    filter.include(includeSpec);
    return this;
}
 
Example #24
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable include(Spec<FileTreeElement> includeSpec) {
    filter.include(includeSpec);
    return this;
}
 
Example #25
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable include(Iterable<String> includes) {
    filter.include(includes);
    return this;
}
 
Example #26
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable include(String... includes) {
    filter.include(includes);
    return this;
}
 
Example #27
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable setExcludes(Iterable<String> excludes) {
    filter.setExcludes(excludes);
    return this;
}
 
Example #28
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
public PatternFilterable setIncludes(Iterable<String> includes) {
    filter.setIncludes(includes);
    return this;
}
 
Example #29
Source File: DefaultAndroidSourceDirectorySet.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
@Override
@NonNull
public PatternFilterable getFilter() {
    return filter;
}
 
Example #30
Source File: DefaultSourceDirectorySet.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public PatternFilterable setIncludes(Iterable<String> includes) {
    patterns.setIncludes(includes);
    return this;
}