While placeholders still get expanded from project.properties, so the expand didn’t overwrite existing expand. And values from the map aren’t even added to the existing properties map. If I have $foo placeholder it will complain that there is missing property for Groovy template expansion.
How can I replace previous expand or overwrite it?
Thanks
Sounds like a very opinionated plugin that you shouldn’t use if you do not agree with its strong opinions.
I don’t think you can remove or overwrite the expansion the plugin is doing.
Each call to filesMatching is added to a queue that are done in order.
So if you escape your $foo using \$foo so that it does not disturb the first expansion pass and comes out as $foo, then your second expansion pass will be done and finally fill in the value for $foo.
Alternatively you would need to add your foo = bar mapping to the project properties so that the plugins expansion pass already has it, for example by setting is as extra property on the project, or by setting it in gradle.properties.
Yes indeed plugin seems to be strongly opinionated regarding those extensions. It’s forcing property expansion in all the yml (suppose Spring configuration files), while this causes a conflict in a my specific use-case.
Will do a PR or a fork of the module and make this part configurable through the plugin extensions.