-
-
Save op-ct/3fca107bd69dabf96894 to your computer and use it in GitHub Desktop.
Install gradle on redhat/centos linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Originally from: | |
# https://gist.github.com/parzonka/9371885 | |
# ------------------------------------------------------------------------------ | |
# - required packages: unzip, java | |
# - 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 | |
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip | |
sudo mkdir -p /opt/gradle | |
sudo unzip -o 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 | |
gradle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment