gradle-plugins
gradle-plugins copied to clipboard
Also patch gradlew.bat
Windows devs now get to benefit from this as well.
How it was done:
- Batch file template similar to the one for shell scripts
- PowerShell is run to do both the HTTP download and the extraction
- Newlines are corrected after the script is patched because in all likelihood the template file will not have the right line endings
- JDK_OS and similar values are left alone for the script itself to correct - the script has an easy time of this because it knows that the OS is windows and the suffix is zip.
Caveats:
- Still exhibits the issue mentioned in #35, consistent with the UNIX one.
Ah, when I mentioned that other ticket, it was because we had a comment in the code saying it was working around that, but the actual workaround I saw in the code was not just that, but was also putting different vendors' JDKs in different locations. So I guess we discovered two separate issues and only reported one.
This wrapper does put the JDK inside GRADLE_HOME, but does not put different vendors' JDKs in different directories. This is mainly because the information about the vendor name isn't being exposed by the plugin at the moment.
Also, while doing this, I noticed that Gradle itself had a .gradle/jdks directory... ominous.