Skip to content

Repository files navigation

English | 简体中文

🔨GVM🔨

A Gradle version manager with managed installs, fast switching, and clean cross-platform release binaries.

ReleaseAURLicense

Install

Quick install with curl

curl -fsSL https://raw.githubusercontent.com/crowforkotlin/gradle-version-manager/main/install.sh | bash

This runs directly from the pipe, does not save install.sh locally, and asks where to add the gvm PATH. The default follows the current shell: bash uses ~/.bashrc, zsh uses ~/.zshrc, and other shells default to no changes.

Install from a release archive

curl -fsSL https://raw.githubusercontent.com/crowforkotlin/gradle-version-manager/main/install.sh | GVM_RELEASE_URL="<release-tarball-url>" bash

Install on Arch Linux

paru -S gvm-bin
yay -S gvm-bin

Build from source

cargo build --release
./install.sh --from ./target/release/gvm --activate

Pin a specific release

curl -fsSL https://raw.githubusercontent.com/crowforkotlin/gradle-version-manager/main/install.sh | GVM_RELEASE_TAG=release-1.0.2 bash

Activation asks whether to update ~/.bashrc, ~/.zshrc, or no file. install.sh --rc-file <path> can select a file directly. The required PATH entry is:

export PATH="$HOME/.local/bin:$HOME/.gvm/bin:$PATH"

install.sh is a POSIX sh script and can run on Linux, macOS, and Git Bash. Android builds are published as separate release assets for Termux or another Android shell environment.

Quick start

Install a Gradle version:

gvm install 8.13

Install the latest stable release:

gvm install current
gvm install latest
gvm install latest-8

Switch and inspect:

gvm use 8.13
gvm current
gvm list

Add an existing Gradle home:

gvm add ~/.gradle/wrapper/dists/gradle-8.13-all/<hash>/gradle-8.13
gvm add --link /opt/gradle-8.13

Command reference

CommandPurpose
gvm install <version>Download and install a managed Gradle version
gvm list-remote [--major N] [--all]List downloadable versions from Gradle's version service
gvm detectFind existing Gradle homes on the machine
gvm add <path> [--link]Add an existing Gradle home by copying or symlinking it
gvm listShow managed versions
gvm use <version>Switch the active global version
gvm currentPrint the selected version
gvm remove <version> [--force]Remove a managed version
gvm clean [--wrapper-cache|--all]Clean ~/.gvm/tmp, broken links, and optional Wrapper remnants

Remote version aliases

AliasMeaning
currentThe current stable Gradle release
latestSame as current
latest-8The latest stable release in the 8.x line

gvm install lts is intentionally unsupported because Gradle does not publish an official LTS line.

Managed layout

~/.gvm/
versions/
8.13/
current -> /home/you/.gvm/versions/8.13
bin/
gradle -> ../current/bin/gradle
tmp/

How it works

  • gvm keeps its own store under ~/.gvm.
  • ~/.gradle/wrapper/dists is treated as a detection and add source, not as the managed source of truth.
  • gvm add copies by default so cleaning Wrapper caches or SDKMAN does not break managed versions.
  • gvm remove deletes copied installs and removes only the gvm-side symlink for gvm add --link.
  • gvm clean removes transient files from ~/.gvm/tmp and can also remove partial Wrapper cache files such as .part and .lck.

Release assets

Current release archives are published for:

  • linux-x86_64
  • linux-aarch64
  • android-x86_64
  • android-aarch64
  • darwin-x86_64
  • darwin-aarch64
  • windows-x86_64
  • windows-aarch64

The AUR package is for Arch Linux and currently supports x86_64 and aarch64. Android binaries are distributed through GitHub Releases instead of AUR.

Windows releases also include standalone executables:

  • gvm-<version>-windows-x86_64.exe
  • gvm-<version>-windows-aarch64.exe

Releases

Packages

Contributors

Languages