I have this gradle task which mostly does what I want.
- all files in srcDir are copied, but not srcDir itself
- all files in propDir are copied, including propDir itself
Except, all files in propBaseDir are also copied, which I don’t want.
I know I can use ‘exclude’ to exclude files, but is there a way to copy ONLY propDir and it’s files into the archive?
task deployAsJar(type: Jar) {
from {
files(srcDir) {
include "**/*"
}
}
from {
files(propBaseDir) {
include "$propDir/**"
}
}
archiveFileName = "examples.jar"
destinationDirectory = file("~")
}