Skip to content

Instantly share code, notes, and snippets.

@dasgoll
Last active May 18, 2021 09:27
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dasgoll/675b2dc2f0916f8f0051 to your computer and use it in GitHub Desktop.
Save dasgoll/675b2dc2f0916f8f0051 to your computer and use it in GitHub Desktop.
### I assume you run the commands as root
gradle_version=2.6
wget -c http://services.gradle.org/distributions/gradle-${gradle_version}-all.zip
unzip gradle-${gradle_version}-all.zip -d /opt
ln -s /opt/gradle-${gradle_version} /opt/gradle
printf "export GRADLE_HOME=/opt/gradle\nexport PATH=\$PATH:\$GRADLE_HOME/bin\n" > /etc/profile.d/gradle.sh
source /etc/profile.d/gradle.sh
# check installation
gradle -v
@arijitslg1
Copy link

Its interesting that when I follow the same steps with a different version i.e. 5.6.2, it does not work.
http://services.gradle.org/distributions/gradle-5.6.2-src.zip-all.zip

However, if I try the same version as yours i.e. 2.6, it works fine.

Not sure what is so different during the configuration of these two versions. Anyone????

@raghuece455
Copy link

sudo mkdir /opt/gradle
wget -c https://services.gradle.org/distributions/gradle-4.2.1-bin.zip
sudo unzip -d /opt/gradle gradle-4.2.1-bin.zip
export PATH=$PATH:/opt/gradle/gradle-4.2.1/bin

gradle -v

Gradle 4.2.1

Build time: 2017-10-02 15:36:21 UTC
Revision: a88ebd6be7840c2e59ae4782eb0f27fbe3405ddf

Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.7.0_211 (Oracle Corporation 24.211-b02)
OS: Linux 4.14.62-65.117.amzn1.x86_64 amd64

Note: Java is prerequisite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment