Gradle File Resolution: Difference between revisions

From NovaOrdis Knowledge Base
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)]


=<tt>Project.files(Object... paths)</tt>=
=<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'>
Line 15: Line 15:
</syntaxhighlight>
</syntaxhighlight>
TODO: https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:files(java.lang.Object[])
TODO: https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:files(java.lang.Object[])
=CoypSpec=
=CoypSpec=
{{External|https://docs.gradle.org/current/javadoc/org/gradle/api/file/CopySpec.html}}
{{External|https://docs.gradle.org/current/javadoc/org/gradle/api/file/CopySpec.html}}

Revision as of 04:27, 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)

TODO: https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:files(java.lang.Object[])

CoypSpec

https://docs.gradle.org/current/javadoc/org/gradle/api/file/CopySpec.html

org.gradle.api.file.FileCollection

https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileCollection.html

Organizatorium

output = new File(buildDir, "test.txt")