Skip to content

Instantly share code, notes, and snippets.

@miquelbeltran
Created February 4, 2016 12:38
Show Gist options
  • Save miquelbeltran/13d325543f0b6f38f849 to your computer and use it in GitHub Desktop.
Save miquelbeltran/13d325543f0b6f38f849 to your computer and use it in GitHub Desktop.
def contentSpec = copySpec {
//exclude 'nocopy.txt', 'nocopy_too.txt'
exclude {it.file.name.startsWith('nocopy')}
from 'src'
}
task copyImages (type: Copy) {
// Parameters can be imported from a variable
with contentSpec
into 'dest'
// Replaces $name with Miquel
expand (
[name: 'Miquel']
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment