I have a gradle zip task that looks like this:
task makeZipDev(type: Zip){
from 'solr_config/solr_home'
excludes ['*/shop/product/data/' ]
archiveName 'solr-home.zip'
destinationDir(file('/docker/solr-dev/'))
}
I want to exclude everything the whole */shop/product/data/
folder from being zipped. And using excludes, as specified.
This is the way to go:
task makeZipDev(type: Zip){
from 'solr_config/solr_home'
exclude '**/shop/product/data/**'
archiveName 'solr-home.zip'
destinationDir(file('/docker/solr-dev/'))
}
or
task makeZipDev(type: Zip){
from 'solr_config/solr_home'
excludes = ['**/shop/product/data/**']
archiveName 'solr-home.zip'
destinationDir(file('docker/solr-dev/'))
}
Also, are you sure about destinationDir
path? It starts under root?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With