I want to replace a @VERSION@
token in a java source file with a version before building (Gradle is my build system of choice).
In my current script ant.replace(file: 'src/main/java/randers/notenoughvocab/main/Reference.java', token: '@VERSION@', value: version)
it replaces the occurrences of @VERSION@
in the actual source file, so after a build all occurrences of the pattern have been replaced by the version and if I change the version the the gradle build file it will no longer find any patterns in there and the version will not update.
I have also seen a task here, but I do not get what values need to be applied for my specific project.
The project layout for my project, if that is needed: