本文整理了Java中org.gradle.api.Project.fileTree()
方法的一些代码示例,展示了Project.fileTree()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.fileTree()
方法的具体详情如下:
包路径:org.gradle.api.Project
类名称:Project
方法名:fileTree
暂无
代码示例来源:origin: uber/okbuck
sourceDir -> {
FileTree found =
project.fileTree(
ImmutableMap.of(
"dir",
代码示例来源:origin: f2prateek/dart
FileCollection variantCompileClasspath = getJarDependencies();
FileCollection uft =
new UnionFileCollection(javaCompiler.getSource(), project.fileTree(destinationFolder));
javaCompiler.setSource(uft);
logger.debug("Analyzing configuration: " + variantCompileClasspath.getFiles());
代码示例来源:origin: hibernate/hibernate-orm
final FileTree fileTree = project.fileTree( classesDir );
for ( File file : fileTree ) {
if ( !file.getName().endsWith( ".class" ) ) {
代码示例来源:origin: diffplug/spotless
return (FileCollection) getProject().fileTree(dir).include((String) target).exclude(excludes);
} else {
return (FileCollection) getProject().fileTree(dir).include((List<String>) target).exclude(excludes);
代码示例来源:origin: diffplug/spotless
@Before
public void fileTree() throws IOException {
Project project = ProjectBuilder.builder()
.withProjectDir(rootFolder())
.build();
fileTree = project.fileTree(rootFolder());
fileTree.exclude("userHome"); // somehow we're getting userHome\native\19\windows-amd64\native-platform.dll
}
代码示例来源:origin: com.android.tools.build/gradle-core
@Override
@NonNull
public List<ConfigurableFileTree> getSourceDirectoryTrees() {
return source.stream()
.map(sourceDir -> project.fileTree(ImmutableMap.of(
"dir", sourceDir,
"includes", getIncludes(),
"excludes", getExcludes())))
.collect(Collectors.toList());
}
代码示例来源:origin: com.amazon.device.tools.build/gradle-core
@Override
public List<File> call() {
return new ArrayList<File>(
project.fileTree(scope.getPreDexOutputDir()).getFiles());
}
代码示例来源:origin: MinecraftForge/ForgeGradle
@InputFiles
public FileCollection getPatches()
{
return getProject().fileTree(patchDir);
}
代码示例来源:origin: io.freefair.gradle/lombok-plugin
@InputFiles
@SkipWhenEmpty
protected FileTree getFilteredInput() {
List<FileTreeInternal> collect = input.getFiles().stream()
.filter(File::isDirectory)
.map(dir -> getProject().fileTree(dir))
.map(FileTreeInternal.class::cast)
.collect(Collectors.toList());
return new UnionFileTree("actual " + getName() + " input", collect);
}
代码示例来源:origin: gradle.plugin.org.kravemir.gradle.sass/plugin
@InputFiles
FileCollection getInputFiles() {
if(getSrcDir().exists() == false)
throw new RuntimeException("srcDir doesn't exists");
if(getSrcDir().isDirectory() == false)
throw new RuntimeException("srcDir isn't directory");
ConfigurableFileTree fileTree = getProject().fileTree(getSrcDir());
return fileTree;
}
代码示例来源:origin: io.freefair.gradle/jsass-plugin
@OutputFiles
protected FileTree getOutputFiles() {
ConfigurableFileTree files = getProject().fileTree(destinationDir);
files.include("**/*.css");
files.include("**/*.css.map");
return files;
}
代码示例来源:origin: MinecraftForge/ForgeGradle
@OutputFiles @Optional
public FileCollection getOuts()
{
File outFile = getOut();
if (outFile.isDirectory())
return getProject().fileTree(outFile);
else
return getProject().files(outFile);
}
代码示例来源:origin: com.amazon.device.tools.build/gradle-core
@Override
public Collection<File> call() {
if (config.isMultiDexEnabled() && !config.isLegacyMultiDexMode()
&& variantData.preDexTask != null) {
return scope.getGlobalScope().getProject()
.fileTree(variantData.preDexTask.getOutputFolder()).getFiles();
}
return Collections.emptyList();
}
});
代码示例来源:origin: MinecraftForge/ForgeGradle
@Override public void execute(Task task)
{
DeobfuscateJar binDeobf = (DeobfuscateJar) task.getProject().getTasks().getByName(TASK_DEOBF_BIN);
DeobfuscateJar decompDeobf = (DeobfuscateJar) task.getProject().getTasks().getByName(TASK_DEOBF);
for (File file : task.getProject().fileTree(delayedFile(DIR_DEP_ATS)))
{
binDeobf.addAt(file);
decompDeobf.addAt(file);
}
}
});
代码示例来源:origin: linkedin/pygradle
@InputFiles
public FileCollection getSourceFiles() {
ConfigurableFileTree componentFiles = getProject().fileTree(getPythonExtension().srcDir);
componentFiles.exclude(standardExcludes());
return componentFiles;
}
代码示例来源:origin: com.darylteo.gradle/javassist-plugin
@InputFiles
public FileCollection getSources() {
if (this.classesDir == null) {
return this.getProject().files();
}
ConfigurableFileTree result = this.getProject().fileTree(this.classesDir);
result.include("**/*.class");
return result;
}
代码示例来源:origin: linkedin/pygradle
@InputFiles
public FileCollection getSourceFiles() {
ConfigurableFileTree componentFiles = getProject().fileTree(getComponent().srcDir);
componentFiles.exclude(standardExcludes());
if (null != sources) {
return sources.plus(componentFiles);
}
return componentFiles;
}
代码示例来源:origin: linkedin/pygradle
@InputFiles
FileCollection getTestFiles() {
ConfigurableFileTree componentFiles = getProject().fileTree(getPythonExtension().testDir);
componentFiles.exclude(standardExcludes());
if (testSource != null) {
return testSource.plus(componentFiles);
}
return componentFiles;
}
}
代码示例来源:origin: linkedin/pygradle
@InputDirectory
public FileTree getVirtualEnv() {
ConfigurableFileTree files = getProject().fileTree(getPythonDetails().getVirtualEnv());
files.exclude(standardExcludes());
return files;
}
代码示例来源:origin: gradle.plugin.com.linkedin.pygradle/pygradle-plugin
@InputDirectory
public FileTree getVirtualEnv() {
ConfigurableFileTree files = getProject().fileTree(getPythonDetails().getVirtualEnv());
files.exclude(standardExcludes());
return files;
}
内容来源于网络,如有侵权,请联系作者删除!