renovatebot - upgrading gradle-wrapper-jar in src/main/resources/dist/gradle/gradle
We had to rename the gradle-wrapper.jar file to gradle-wrapper-jar when adding it to the resources gradle sub-folder, because .jar files cannot be kept in the resources tree.
And therefore the gradle-wrapper-jar file is not known to Renovatebot and it will not automatically be upgraded.
Google Gemini claims that this issue can be resolved by adding the following additional configuration to the renovate.json file:
{
"gradle-wrapper": {
"fileMatch": [
"src/main/resources/dist/gradle/gradle/wrapper/gradle-wrapper-jar"
]
}
}
However, I could find any confirmation of this suggestion in renovatebot docs.
This configuration change should work (to be tested):
{
"packageRules": [
{
"matchManagers": ["gradle-wrapper"],
"postUpdateOptions": ["runScripts"],
"postUpdateScripts": [
"mv src/main/resources/dist/gradle/gradle/wrapper/gradle-wrapper-jar src/main/resources/dist/gradle/gradle/wrapper/gradle-wrapper.jar",
"src/main/resources/dist/gradle/gradlew wrapper",
"mv src/main/resources/dist/gradle/gradle/wrapper/gradle-wrapper.jar src/main/resources/dist/gradle/gradle/wrapper/gradle-wrapper-jar"
]
}
]
}
Alternatively, and less desirable, run gradlew wrapper to regenerate the Gradle wrapper JAR file as part of the "jbang export gradle ..." pipeline.
because .jar files cannot be kept in the resources tree.
what prevents that atm?
This configuration change should work (to be tested):
I don't think it will work due to:
"Post-upgrade tasks are blocked by default for security reasons, so the admin of Renovate needs to choose whether to allow specific commands or any commands to be run"
i can't imagine those are available on github hosted renovate.