Hi, i am trying with below code to filter multiple files for string substitution. i have filters folder where i created environments.groovy file. I am passing -Penv=dev so that value picks from groovy file.
Currently filter is working for only one file, not working for two different files. could you please help here.
distributions {
main {
baseName = ‘basefolder’
contents {
from (’…/basefolder/’){
filesMatching(‘test.properties’) {
expand(new ConfigSlurper(env).parse(file(“filters/environments.groovy”).text))
}
}
from (’…/basefolder/’){
filesMatching(‘test.sh’) {
expand(new ConfigSlurper(env).parse(file(“filters/environments.groovy”).text))
}
}
}
}
}