Skip to content

[feature] Add backend for sdk #86

@curetheopensource

Description

@curetheopensource

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions