interface ConfigurableFileCollection : FileCollection
A ConfigurableFileCollection
is a mutable FileCollection
.
You can obtain an instance of ConfigurableFileCollection
by calling
abstract fun builtBy(vararg tasks: Any): ConfigurableFileCollection
Registers some tasks which build the files of this collection. |
|
abstract fun from(vararg paths: Any): ConfigurableFileCollection
Adds a set of source paths to this collection. The given paths are evaluated as per |
|
abstract fun getBuiltBy(): MutableSet<Any>
Returns the set of tasks which build the files of this collection. |
|
abstract fun getFrom(): MutableSet<Any>
Returns the set of source paths for this collection. The paths are evaluated as per |
|
abstract fun setBuiltBy(tasks: MutableIterable<*>): ConfigurableFileCollection
Sets the tasks which build the files of this collection. |
|
abstract fun setFrom(paths: MutableIterable<*>): Unit abstract fun setFrom(vararg paths: Any): Unit
Sets the source paths for this collection. The given paths are evaluated as per |
abstract fun add(collection: FileCollection): FileCollection
Adds another collection to this collection. This is an optional operation. |
|
abstract fun addToAntBuilder(builder: Any, nodeName: String, type: AntType): Unit
Adds this collection to an Ant task as a nested node. The given type determines how this collection is added:
AntType#ResourceCollection , if the target Ant task supports it, as this is generally the most efficient. Using the other types may involve copying the contents of this collection to a temporary directory.
abstract fun addToAntBuilder(builder: Any, nodeName: String): Any
Adds this collection to an Ant task as a nested node. Equivalent to calling |
|
abstract fun asType(type: Class<*>): Any
Converts this collection into an object of the specified type. Supported types are: You can call this method in your build script using the |
|
abstract fun contains(file: File): Boolean
Determines whether this collection contains the given file. Generally, this method is more efficient than calling |
|
abstract fun filter(filterClosure: Closure<Any>): FileCollection
Restricts the contents of this collection to those files which match the given criteria. The filtered collection is live, so that it reflects any changes to this collection. The given closure is passed the File as a parameter, and should return a boolean value. abstract fun filter(filterSpec: Spec<in File>): FileCollection
Restricts the contents of this collection to those files which match the given criteria. The filtered collection is live, so that it reflects any changes to this collection. |
|
abstract fun getAsFileTree(): FileTree
Converts this collection to a FileTree. Generally, for each file in this collection, the resulting file tree will contain the source file at the root of the tree. For each directory in this collection, the resulting file tree will contain all the files under the source directory. |
|
abstract fun getAsPath(): String
Returns the contents of this collection as a platform-specific path. This can be used, for example, in an Ant <path> element. |
|
abstract fun getFiles(): MutableSet<File>
Returns the contents of this collection as a Set. |
|
abstract fun getSingleFile(): File
Returns the content of this collection, asserting it contains exactly one file. |
|
abstract fun isEmpty(): Boolean
Returns true if this collection is empty. Generally, calling this method is more efficient than calling |
|
abstract fun minus(collection: FileCollection): FileCollection
Returns a You can call this method in your build script using the |
|
abstract fun plus(collection: FileCollection): FileCollection
Returns a You can call this method in your build script using the |
|
abstract fun stopExecutionIfEmpty(): FileCollection
Throws a StopExecutionException if this collection is empty. |
operator fun ConfigurableFileCollection.getValue(receiver: Any?, property: KProperty<*>): ConfigurableFileCollection
Property delegate for ConfigurableFileCollection instances. |
|
operator fun ConfigurableFileCollection.setValue(receiver: Any?, property: KProperty<*>, value: Iterable<*>): Unit
Property delegate for ConfigurableFileCollection instances. |