Gradle File Resolution: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
* [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#fileTree-java.lang.Object- Project.fileTree(baseDir)] | * [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#fileTree-java.lang.Object- Project.fileTree(baseDir)] | ||
=<span id='Project.files.28Object..._paths.29'></span><tt>Project.file(Object path)</tt> and <tt>Project.files(Object... paths)</tt>= | =<span id='Project_file'></span><span id='Project.files.28Object..._paths.29'></span><tt>Project.file(Object path)</tt> and <tt>Project.files(Object... paths)</tt>= | ||
Many methods that accept files as arguments mention that the inputs will be "evaluated as per: | Many methods that accept files as arguments mention that the inputs will be "evaluated as per: | ||
<syntaxhighlight lang='groovy'> | <syntaxhighlight lang='groovy'> |
Revision as of 04:29, 9 November 2020
Internal
Overview
The Project API exposes methods for file resolution inside a project:
Project.file(Object path) and Project.files(Object... paths)
Many methods that accept files as arguments mention that the inputs will be "evaluated as per:
Project.files(Object... paths)
CoypSpec
org.gradle.api.file.FileCollection
Organizatorium
output = new File(buildDir, "test.txt")