addToAntBuilder

abstract fun addToAntBuilder(builder: Any, nodeName: String, type: FileCollection.AntType)(source)

Adds this collection to an Ant task as a nested node. The given type determines how this collection is added:

  • MatchingTask: adds this collection to an Ant MatchingTask. The collection is converted to a set of source directories and include and exclude patterns. The source directories as added as an Ant Path with the given node name. The patterns are added using 'include' and 'exclude' nodes.
  • FileSet: adds this collection as zero or more Ant FileSets with the given node name.
  • ResourceCollection: adds this collection as zero or more Ant ResourceCollections with the given node name.
You should prefer using 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.

Parameters

builder

The builder to add this collection to.

nodeName

The target node name.

type

The target Ant type


abstract fun addToAntBuilder(builder: Any, nodeName: String): Any(source)

Adds this collection to an Ant task as a nested node. Equivalent to calling addToAntBuilder(builder, nodeName,AntType.ResourceCollection).