Installing Gradle
- Download and extract Gradle to a specified directory (for example, /opt/tools/installed/).
1 2 3
wget https://downloads.gradle.org/distributions/gradle-4.10-bin.zip --no-check-certificate unzip gradle-4.10-bin.zip mv gradle-4.10 /opt/tools/installed/
- Modify the Gradle environment variables.
- Open the /etc/profile file.
1vi /etc/profile - Press i to enter the insert mode and add the following content to the end of the file:
1 2
export GRADLE_HOME=/opt/tools/installed/gradle-4.10 export PATH=$GRADLE_HOME/bin:$PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /etc/profile file.
- Make the environment variables take effect.
1source /etc/profile
Parent topic: Configuring the Compilation Environment