I have gradle installed on my Ubuntu 15.10 System.I want to find the location where it is.
I am following this article. Here it is given that sample program can be found at samples/java/quickstart
.
I want to open this sample program and for this I want to find location of gradle on my system, which I have downloaded from the official gradle site, and installed using ubuntu terminal.
How to configure Android Studio. Open Preferences -> Build, Execution, Deployment -> Gradle . Select Use local gradle distribution and specify Gradle home . On Mac: /usr/local/opt/gradle/libexec in case you installed it via brew .
Regarding the ~/. gradle : it is the GRADLE_USER_HOME (by default USER_HOME/. gradle) : it can be redefined in multiple ways (see here) and it is used as soon as a gradle process is started. A gradle process is started as soon as you run a command starting with gradle <with args> in a directory where a build.
Verify Gradle Installation. Now open the command prompt. In the command prompt, enter Gradle -version. It will display the current version of Gradle just installed on the screen.
There's multiple ways to locate where gradle
is actually installed on your computer :
locate
: will locate where the bin gradle
is on your computer. Assuming, gradle
is on your PATH
. It will most likely locate gradle in /usr/bin
or /usr/share
directory. If it locates the symbolic link use either ls -l
or readlink
to see where the bin is actually located.which
: similar as locate
find
: to use at end if neither locate
neigher which
worked. It's the "brutal" way. You can use find / -name "gradle" 2> /dev/null
to find all occurence of gradle (exact match) on your computer./usr/lib/gradle/default
-> /usr/lib/gradle/5.x.x
the former is a link file targeted to actual directory which is the version you currently using.
apt install gradle in Ubuntu 18.10
which
will locate to /usr/bin/gradle
which is gradle start up script.
Ubuntu 20.04.3 LTS in WSL2 in Windows 10 Pro (10.0.19043 N/A Build 19043):
$ sudo apt install gradle
$ which gradle
/usr/bin/gradle
$ readlink -f /usr/bin/gradle
/usr/share/gradle/bin/gradle
$ gradle --version
Gradle 4.4.1
Groovy: 2.4.17
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With