Initially found a script to install gradle, but later on found out that script is not required because groovy environment manager can also install gradle.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/bin/bash # installs to /opt/gradle # existing versions are not overwritten/deleted # seamless upgrades/downgrades # $GRADLE_HOME points to latest *installed* (not released) gradle_version=1.12 gradle_path=~/gradle wget -N http://services.gradle.org/distributions/gradle-${gradle_version}-all.zip -P /tmp/ sudo unzip -q /tmp/gradle-${gradle_version}-all.zip -d ${gradle_path} sudo ln -sfn gradle-${gradle_version} ${gradle_path}/gradle sudo printf "export GRADLE_HOME=${gradle_path}/gradle/\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh . /etc/profile.d/gradle.sh # check installation gradle -v |
GVM – Groovy enVironment Manager official webpage: http://gvmtool.net/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
## install gvm $ curl -s get.gvmtool.net | bash ## isstall groovy on default version $ gvm install groovy ## see avaliable version of gradle $ gvm list gradle $ gvm install gradle 1.12 ## verify $ gvm current Using: gradle: 1.12 groovy: 2.3.6 |