Up to coursier 1.0.0-RC12, setting COURSIER_CACHE=foo makes files land
in e.g. foo/https/repo1.maven.org/….
https://github.com/coursier/coursier/pull/676 changed that to foo/v1/https/….
This commit reverts things back to what they were before that.
In the long term, it would be better to keep the v1 component there, but
I'd prefer not to change that behavior right now.
This cleans up the home directories of users and helps making sure that
Coursier's cache is not accidentically backed up by applications or OS
functionality.
The precedence is as follows:
- existing $COURSIER_CACHE environment variable
- existing coursier.cache Java property
- existing operating system specific standards:
- Linux: $XDG_CACHE_HOME/coursier, with fallback to ~/.cache/coursier
- Windows: {SpecialFolder.LocalApplicationData}/cache/Coursier
- macOS: $HOME/Library/Caches/Coursier
- existing ~/.coursier/
- fallback to operating system specific standard directory else.
See discussion in https://github.com/coursier/coursier/pull/676#issuecomment-338974822