codeconsole opened a new pull request, #16006: URL: https://github.com/apache/grails-core/pull/16006
### Problem `GrailsGradlePlugin` wires the `@info.app.name@` / `@info.app.version@` / `@info.app.grailsVersion@` substitution into `processResources` via an Ant `ReplaceTokens` content filter. Gradle does not consider filter parameters in Copy-task up-to-date checks (gradle/gradle#1191), and the token values are not declared as task inputs — so after a version change `processResources` still reports `UP-TO-DATE` and the previously substituted values are repackaged into every subsequent build until a `clean`. Observed in practice: after upgrading an app from `8.0.0-M2` to `8.0.0-M3`, `<g:meta name="info.app.grailsVersion"/>` kept reporting `8.0.0-M2` in production. The classpath was fully M3, but `BOOT-INF/classes/application.yml` still carried the value substituted weeks earlier. ### Reproduce 1. Build any generated app (`./gradlew processResources`) — `build/resources/main/application.yml` contains the substituted `info.app.grailsVersion`. 2. Change `grailsVersion` in `gradle.properties`. 3. Run `./gradlew processResources` (or `bootJar`) again — the task is `UP-TO-DATE` and the file still contains the old version. ### Fix Declare the token map as input properties on the task: ```groovy task.inputs.properties(replaceTokens) ``` This is the same approach the plugin already uses for `grails.build.info` (`task.inputs.properties(buildPropertiesContents)`), which is why that file does pick up version bumps while the `application.yml` substitutions do not. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
