Skip to content

Instantly share code, notes, and snippets.

@obar1
Created December 16, 2015 10:12
Show Gist options
  • Save obar1/da63927df3b546f15942 to your computer and use it in GitHub Desktop.
Save obar1/da63927df3b546f15942 to your computer and use it in GitHub Desktop.
# installs to /opt/gradle
# existing versions are not overwritten/deleted
# seamless upgrades/downgrades
# $GRADLE_HOME points to latest *installed* (not released)
gradle_version=2.9
mkdir -p /opt/gradle
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip --no-check-certificate
sudo unzip -foq gradle-${gradle_version}-all.zip -d /opt/gradle
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh
. /etc/profile.d/gradle.sh
# check installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment