gradle zip task 排除文件

1down voteaccepted

This is the way to go:

task makeZipDev(type: Zip){
  from 'solr_config/solr_home'
  exclude '**/shop/product/data/**' //exclude 
  archiveName 'solr-home.zip'
  destinationDir(file('/docker/solr-dev/'))
}

or

task makeZipDev(type: Zip){
  from 'solr_config/solr_home'
  excludes = ['**/shop/product/data/**']  //exclude
  archiveName 'solr-home.zip'
  destinationDir(file('docker/solr-dev/'))
}

猜你喜欢

转载自my.oschina.net/sfshine/blog/1632336