While supporting complicated include/exclude CopySpec stuff would probably be hard, it would be nice if basic include/exclude of simple file globs worked.
tasks.register<SymUnzip>("unzipIt") {
from("source.zip")
into(file("$buildDir/myfiles"))
exclude("readme.txt")
exclude("*.so")
}
While reading the code, though, I was unable to figure out why it doesn't work already. It seems like this task is doing everything more or less the same way as the Copy or Sync task, so I couldn't see why the excluded items wouldn't be excluded.
It seems like exclude(String) would get set on the root CopySpec, and the the copy framework would use that to filter the stream it's passing in, so I wasn't able to see why it wopuld be passing excluded files through.
While supporting complicated include/exclude CopySpec stuff would probably be hard, it would be nice if basic include/exclude of simple file globs worked.
While reading the code, though, I was unable to figure out why it doesn't work already. It seems like this task is doing everything more or less the same way as the Copy or Sync task, so I couldn't see why the excluded items wouldn't be excluded.
It seems like
exclude(String)would get set on the rootCopySpec, and the the copy framework would use that to filter the stream it's passing in, so I wasn't able to see why it wopuld be passing excluded files through.