I am trying to update a properties file located located at ‘src/main/resources/path/to/package/build.properties’ every time I run the build task. What I have so far is:
Am I getting the destination directory wrong? I tried specifying the specific location for the ‘into’ field, but that didn’t work either. I want to be able to let Gradle decide where my source files’ destination should be.
So, I was able to get it working, but not with ‘getDestDir()’. I can’t figure out how to let Gradle decide where to put it for me, or if it is even possible to specify that.
I don’t understand the question, as you are already using ‘into’ to determine the destination. Maybe your ‘getDestDir()’ method is computing the wrong value. By the way, to do resource filtering you’d just have to configure the ‘processResources’ task, which is also of type ‘Copy’.