How can you execute gradle processResources
on files that contain $
characters without escaping the $
in the files?
I ha
JB Nizet's comment provided valuable insight. The problem was indeed due to the usage of expand()
(although not immediately visible since it was located in an allProjects()
script in the parent project). The reason why expand()
was added in the first place was the desire to populate the info.build.* properties in the application.properties
file (so that they are available through Spring Boot's info endpoint).
Solution: Use filesMatching()
to only expand()
selected files. The following snippet solved the specific problem related to Spring Boot:
processResources {
filesMatching('application.properties') {
expand(project.properties)
}
}