Problem:
I want to extract compile project(‘myschool’) in distZip task and extract resources files with filter of .json files.
I tried all ways but not succeeded. Please help meout how to iterate all other deps and extract resources.
Jars I want to extract are snapshot jars.(ex: compile project(‘myschool’))
Sample Script
task buildZip(type: Zip, dependsOn: [ build ]) {
baseName = 'myschool-app'
from (configurations.dist) {
duplicatesStrategy = 'exclude'
into 'lib'
}
from (copyResourcesOfDeps){
duplicatesStrategy = 'exclude'
into('Config/behaviour/')
}
from(copyConfigFiles) {
duplicatesStrategy = 'exclude'
into('Config')
}
}
task copyResourcesOfDeps(type: Copy) {
dependsOn configurations.bundle
//configurations.compile.collect{ print it }
from {
configurations.compile.collect{ zipTree(it) }
}
include 'beans.*.xml'
include 'routes.*.xml'
into('build/Config/behaviour/')
}