You can have a dependency with a single jar or multiple jar files.
With a single jar file you can add:
dependencies {
compile files('libs/local_dependency.jar')
}
It's possible to add a directory of jars to compile.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
The compile fileTree(dir: 'libs', include: ['*.jar']
) line tells the build system to include any JAR files inside the app/libs/
directory in the compilation classpath and in the final package of your app.
If you have modules that require local binary dependencies, copy the JAR files for these dependencies into <moduleName>/libs
inside your project.
If you need to add an aar files you can read more details here.