configure(tasks.processResources) {
include '**/*.properties'
expand(basedir: projectDir)
}
to replace occurences of ${basedir} in my property files I get a
Caused by: org.gradle.api.GradleException: Could not copy file ‘/Users/markus/src/sample/src/main/resources/logging.properties’ to ‘/Users/markus/src/sample/build/resources/main/logging.properties’.
Caused by: groovy.lang.MissingPropertyException: No such property: tb for class: SimpleTemplateScript2
wow, thanks a lot, that’s the reason for the exeption.
using exclude '**/logging.properties' brings it to work, unfortunately it also excludes logging.properties from being copied to the build dir.
do you have a hint for me how I can just exclude it from the “expand” ?
filesMatching might be easier if you have something other than properties that you’re copying too. You could then check for fcd.name != ‘logging.properties’ instead.