Hello again! I would like to add the backend for SDKMAN!. It has some special features compared to other package managers:
- can install different versions of same SDK (the candidate term is originally used), only the one version per candidate could be set as default (current);
- additionally to the version number, some candidates have the vendor suffix (e.g.
21.0.4-tem for java);
- interactive by default (asks to set the installed candidate as the new default) - the CLI should be either manually configured or installed with additional options;
- the original CLI does not support listing candidates, only theirs versions and the whole list of candidates available for installation;
- traditionally installed for the current user, no
sudo permissions needed.
How to implement
- add the new backend named
sdk;
- to support different versions, an
sdk package name could contain an optional segment, e.g. { package = "java/20.1.4-tem" }. Without it, the latest SDK's default version is being installed (the CLI supports this case);
- it is the user's responsibility to disable interactivity of
sdk (a little instruction about non-interactive usage could be added in the readme);
- to find out which SDKs are installed by the manager,
lsing directories in $SDKMAN_DIR/candidates could be performed;
- parse the table-ish output from
sdk list <candidate>, the output format differs depending on whether the candidate supports vendors or not;
- keep the default candidates' versions by calling
sdk default <candidate> <version> in non-interactive mode.
What do think about this feature?
Hello again! I would like to add the backend for SDKMAN!. It has some special features compared to other package managers:
21.0.4-temforjava);sudopermissions needed.How to implement
sdk;sdkpackage name could contain an optional segment, e.g.{ package = "java/20.1.4-tem" }. Without it, the latest SDK's default version is being installed (the CLI supports this case);sdk(a little instruction about non-interactive usage could be added in the readme);lsing directories in$SDKMAN_DIR/candidatescould be performed;sdk list <candidate>, the output format differs depending on whether the candidate supports vendors or not;sdk default <candidate> <version>in non-interactive mode.What do think about this feature?