Skip to content

Cache in GRADLE_HOME and cache JDKs by vendor#44

Open
hakanai wants to merge 2 commits into
rmee:masterfrom
hakanai:jdks-by-vendor
Open

Cache in GRADLE_HOME and cache JDKs by vendor#44
hakanai wants to merge 2 commits into
rmee:masterfrom
hakanai:jdks-by-vendor

Conversation

@hakanai
Copy link
Copy Markdown
Contributor

@hakanai hakanai commented Feb 22, 2022

Building on top of the Windows batch file PR, but adding:

  • Updated the shell script patcher to also put the JDK into $HOME/.gradle to match the Windows one
  • Added "vendor" property to distinguish two JDKs with the same version but different vendors, updated both scripts to use that

With this I think all the customisations we had done to our own wrappers are covered, but I do wonder whether a cleaner way to patch the files after this plugin patches them would be nice...

Fixes issue rmee#35.

Also:
- Added vendor property so that the same version from two different vendors doesn't clash in the cache directory.

public class JdkBootstrapExtension {

private String vendor;
Copy link
Copy Markdown
Contributor Author

@hakanai hakanai Feb 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One possible trap I can see with this is that adoptopenjdk is the default in the constructor - so if someone calls setUrlTemplate, they might forget to also set a vendor. Do we want to automatically set it to "unknown" or something if they call that?

I'd also have to update the other PR to set the vendor to "temurin" when this gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant