You can add multiple aar
dependencies with just few lines of code.
Add local flatDir
repository:
repositories {
flatDir {
dirs 'libs'
}
}
Add every aar
in libs
directory to compile
dependency configuration:
fileTree(dir: 'libs', include: '**/*.aar')
.each { File file ->
dependencies.add("compile", [name: file.name.lastIndexOf('.').with { it != -1 ? file.name[0..<it] : file.name }, ext: 'aar'])
}