api / org.gradle.api.file / CopySpec / with

with

abstract fun with(vararg sourceSpecs: CopySpec): CopySpec

Adds the given specs as a child of this spec.

 def contentSpec = copySpec { from("content") { include "**/*.txt" } } task copy(type: Copy) { into "$buildDir/copy" with contentSpec } 

Parameters

sourceSpecs - The specs to add

Return
this