The example below describes how to declare three different types of direct dependencies in the app/ module's build.gradle
file:
android {...}
...
dependencies {
// The 'compile' configuration tells Gradle to add the dependency to the
// compilation classpath and include it in the final package.
// Dependency on the "mylibrary" module from this project
compile project(":mylibrary")
// Remote binary dependency
compile 'com.android.support:appcompat-v7:24.1.0'
// Local binary dependency
compile fileTree(dir: 'libs', include: ['*.jar'])
}