org.gradle.api.file.ConfigurableFileTree Java Examples
The following examples show how to use
org.gradle.api.file.ConfigurableFileTree.
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: AppVariantContext.java From atlas with Apache License 2.0 | 6 votes |
public List<ConfigurableFileTree> getAwSourceOutputDir(AwbBundle awbBundle) { Project project = scope.getGlobalScope().getProject(); // Build the list of source folders. ImmutableList.Builder<ConfigurableFileTree> sourceSets = ImmutableList.builder(); // then all the generated src folders. if (getAwbRClassSourceOutputDir(awbBundle) != null) { sourceSets.add(project.fileTree(getAwbRClassSourceOutputDir(awbBundle))); } sourceSets.add(project.fileTree(getAwbMergeResourcesOutputDir(awbBundle))); if (scope.getGlobalScope().getExtension().getDataBinding().isEnabled()) { sourceSets.add(project.fileTree(getAwbClassOutputForDataBinding(awbBundle))); } return sourceSets.build(); }
Example #2
Source File: AbstractSassCompileTask.java From GradleSassPlugin with Apache License 2.0 | 6 votes |
@InputFiles @PathSensitive(PathSensitivity.RELATIVE) FileCollection getSassFiles() { 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()); if(getInclude() != null) fileTree.include(getInclude()); if(getExclude() != null) fileTree.exclude(getExclude()); return fileTree; }
Example #3
Source File: AbstractPythonTestSourceDefaultTask.java From pygradle with Apache License 2.0 | 5 votes |
@InputFiles FileCollection getTestFiles() { ConfigurableFileTree componentFiles = getProject().fileTree(getPythonExtension().testDir); componentFiles.exclude(standardExcludes()); if (testSource != null) { return testSource.plus(componentFiles); } return componentFiles; }
Example #4
Source File: AbstractPythonMainSourceDefaultTask.java From pygradle with Apache License 2.0 | 5 votes |
@InputFiles public FileCollection getSourceFiles() { ConfigurableFileTree componentFiles = getProject().fileTree(getComponent().srcDir); componentFiles.exclude(standardExcludes()); if (null != sources) { return sources.plus(componentFiles); } return componentFiles; }
Example #5
Source File: ExportDocsTask.java From curiostack with MIT License | 5 votes |
public ExportDocsTask() { var objects = getProject().getObjects(); mdFiles = objects.property(ConfigurableFileTree.class); urlPrefix = objects.property(String.class).convention(""); gaTrackingId = objects.property(String.class).convention(""); outputDir = objects.directoryProperty(); }
Example #6
Source File: PipWheelAction.java From pygradle with Apache License 2.0 | 5 votes |
private boolean doesWheelExist(PackageInfo packageInfo) { if (!packageSettings.isCustomized(packageInfo)) { Optional<File> wheel = wheelCache.findWheel(packageInfo.getName(), packageInfo.getVersion(), pythonDetails); if (wheel.isPresent()) { File wheelFile = wheel.get(); File wheelCopy = new File(wheelExtension.getWheelCache(), wheelFile.getName()); if (!wheelFile.equals(wheelCopy)) { try { FileUtils.copyFile(wheelFile, wheelCopy); } catch (IOException e) { throw new UncheckedIOException(e); } } if (PythonHelpers.isPlainOrVerbose(project)) { logger.lifecycle("Skipping {}, in wheel cache {}", packageInfo.toShortHand(), wheelFile); } return true; } } ConfigurableFileTree tree = project.fileTree(wheelExtension.getWheelCache(), action -> { String sanitizedName = packageInfo.getName().replace('-', '_'); String sanitizedVersion = (packageInfo.getVersion() == null ? "unspecified" : packageInfo.getVersion()).replace('-', '_'); action.include("**/" + sanitizedName + "-" + sanitizedVersion + "-*.whl"); }); if (tree.getFiles().size() >= 1) { if (PythonHelpers.isPlainOrVerbose(project)) { logger.lifecycle("Skipping {} wheel - Installed", packageInfo.toShortHand()); } return true; } return false; }
Example #7
Source File: InputDirectoryPropertyAnnotationHandler.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public void validate(String propertyName, Object value, Collection<String> messages) { File fileValue = (value instanceof ConfigurableFileTree) ? ((ConfigurableFileTree) value).getDir() : (File) value; if (!fileValue.exists()) { messages.add(String.format("Directory '%s' specified for property '%s' does not exist.", fileValue, propertyName)); } else if (!fileValue.isDirectory()) { messages.add(String.format("Directory '%s' specified for property '%s' is not a directory.", fileValue, propertyName)); } }
Example #8
Source File: AbstractSassCompileTask.java From GradleSassPlugin with Apache License 2.0 | 5 votes |
@Internal 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; }
Example #9
Source File: DefaultScript.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Closure closure) { DeprecationLogger.nagUserOfDeprecated("fileTree(Closure)", "Use fileTree((Object){ baseDir }) to have the closure used as the file tree base directory"); //noinspection deprecation return fileOperations.fileTree(closure); }
Example #10
Source File: AbstractProject.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Map<String, ?> args) { return getFileOperations().fileTree(args); }
Example #11
Source File: DefaultScript.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Object baseDir) { return fileOperations.fileTree(baseDir); }
Example #12
Source File: DefaultScript.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Map<String, ?> args) { return fileOperations.fileTree(args); }
Example #13
Source File: DefaultScript.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Object baseDir) { return fileOperations.fileTree(baseDir); }
Example #14
Source File: CreateOrmLiteConfigTask.java From ormlite-android-gradle-plugin with Apache License 2.0 | 4 votes |
@InputFiles public FileCollection getSources() { ConfigurableFileTree fileTree = getProject().fileTree(this.sourceDir); fileTree.include("**/*.java"); return fileTree; }
Example #15
Source File: DefaultConfigurableFileTree.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree builtBy(Object... tasks) { buildDependency.add(tasks); return this; }
Example #16
Source File: AbstractProject.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Closure closure) { DeprecationLogger.nagUserOfDeprecated("fileTree(Closure)", "Use fileTree((Object){ baseDir }) to have the closure used as the file tree base directory"); return fileOperations.fileTree(closure); }
Example #17
Source File: AbstractPythonMainSourceDefaultTask.java From pygradle with Apache License 2.0 | 4 votes |
@InputDirectory public FileTree getVirtualEnv() { ConfigurableFileTree files = getProject().fileTree(getPythonDetails().getVirtualEnv()); files.exclude(standardExcludes()); return files; }
Example #18
Source File: ProcessSvnDiggerFiles.java From zap-extensions with Apache License 2.0 | 4 votes |
@InputFiles @SkipWhenEmpty public ConfigurableFileTree getSourceFiles() { return sourceFiles; }
Example #19
Source File: ExportDocsTask.java From curiostack with MIT License | 4 votes |
@InputFiles @PathSensitive(PathSensitivity.RELATIVE) public Property<ConfigurableFileTree> getMdFiles() { return mdFiles; }
Example #20
Source File: DefaultScript.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Object baseDir, Closure configureClosure) { return fileOperations.fileTree(baseDir, configureClosure); }
Example #21
Source File: AbstractProject.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Map<String, ?> args) { return fileOperations.fileTree(args); }
Example #22
Source File: AbstractProject.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Object baseDir) { return fileOperations.fileTree(baseDir); }
Example #23
Source File: DefaultScript.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Object baseDir, Closure configureClosure) { return fileOperations.fileTree(baseDir, configureClosure); }
Example #24
Source File: DefaultScript.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Closure closure) { DeprecationLogger.nagUserOfDeprecated("fileTree(Closure)", "Use fileTree((Object){ baseDir }) to have the closure used as the file tree base directory"); //noinspection deprecation return fileOperations.fileTree(closure); }
Example #25
Source File: DefaultScript.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Map<String, ?> args) { return fileOperations.fileTree(args); }
Example #26
Source File: DefaultScript.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree fileTree(Object baseDir) { return fileOperations.fileTree(baseDir); }
Example #27
Source File: DefaultConfigurableFileTree.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree setBuiltBy(Iterable<?> tasks) { buildDependency.setValues(tasks); return this; }
Example #28
Source File: DefaultConfigurableFileTree.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ConfigurableFileTree builtBy(Object... tasks) { buildDependency.add(tasks); return this; }
Example #29
Source File: FileOperations.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
@Deprecated ConfigurableFileTree fileTree(Closure closure);
Example #30
Source File: NoHttpExtension.java From nohttp with Apache License 2.0 | 4 votes |
public ConfigurableFileTree getSource() { return this.source; }