Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle: Where are external dependencies stored?

Tags:

gradle

I'm using Gradle and I gave the following dependencies:

dependencies {
    compile 'org.slf4j:slf4j-api:1.7.13'
    compile 'org.mongodb:mongodb-driver:3.2.2'
    testCompile 'org.testng:testng:6.8.1'
    testCompile 'junit:junit:3.8.2'
}

I want to download the driver of MongoDB. I typed:

gradle build

and after a few seconds I got a message saying the the build had succeeded. Now, I'm looking for the jar file/directory of MongoDB driver, and I don't find it. Where is it supposed to be?

like image 330
CrazySynthax Avatar asked Dec 16 '16 16:12

CrazySynthax


People also ask

Where does Gradle store its dependencies?

Gradle declares dependencies on JAR files inside your project's module_name /libs/ directory (because Gradle reads paths relative to the build.gradle file). This declares a dependency on version 12.3 of the "app-magic" library, inside the "com.example.android" namespace group.

Where are Android dependencies stored?

In your file manager there is a Folder named Android. That folder has all the libraries of all the Apps. Some data are not visible to normal user so you have to root your phone to be able to view all the files in Android Folder.

Where are jars in Gradle project?

The Jar is created under the $project/build/libs/ folder.

Where should I add dependencies in Gradle project?

Defining your dependency Now that Gradle knows which repository to look in, let's tell it what to look for. We do that within the dependencies section of the build script. Specify the co-ordinates, or in other words the group, artifactId, and version, within a string using a colon separator.


1 Answers

~/.gradle/caches/modules-2/files-2.1/org.mongodb/mongodb-driver/3.2.2/<checksum of the JAR>/mongodb-driver-3.2.2.jar
like image 68
Vampire Avatar answered Sep 29 '22 04:09

Vampire