I have a project where I have locally customized the gradlew.bat script to boostrap Java before checking the JAVA_HOME. I’d like to create a custom Gradle Wrapper jar with this for my other projects, but I can’t figure out how to generate it.
I went so far as to try and crack open the existing Gradle Wrapper jar I was using and manually updating it but I have no idea where the gradlew(.bat) lives in the wrapper jar itself.
The file is not living in the wrapper jar at all. The wrapper jar just provisions the right Gradle version which then contains the wrapper scripts or templates thereof.
It’s part of the distribution configured in the wrapper properties file. So you either need a custom Gradle distribution or you need to add a doLast action to the wrapper task that does your modifications to the standard files.