Bootstrap gradle-wrapper with gradle wrapper scripts

Consider improving gradle wrapper scripts to download gradle-wrapper.jar when it’s absent.

In Apache project source distributions shipping gradle-wrapper.jar or any kind of binaries is not acceptable. (see https://issues.apache.org/jira/browse/KAFKA-1490 and https://issues.apache.org/jira/browse/SAMZA-283 ).

Ideally the gradle command would respect the values in the gradle-wrapper.properties file, then we wouldn’t need any shell scripts or .jar files to get a reproducible build. The best way to respect that file is the tooling api actually. So, I took an approach where I bundle the tooling api jar into an executable shell script (https://github.com/quidryan/skipper). I can then run “skipper” instead of any gradlew and still get reproducible builds that uses the distribution that I have specified. I haven’t fully figured out how to bundle this for windows, I guess the principle of respecting the gradle-wrapper.properties is what counts, so a windows version could be a .bat file and a .jar, that is installed onto the PATH.

I’d like to see Gradleware offer a CLI tool like this. It better mimics how IDEs reads in a project and possible eliminates the requirement of checking in a binary file for reproducible builds.