pvorb
pvorb

Reputation: 7279

Use all JAR files in lib/ as dependencies

I like to drop all JAR file dependencies that are not in Maven Central, into a lib/ directory in the root of my Java projects.

Is there a way to make Gradle automatically add all JAR files in lib/?

Upvotes: 0

Views: 64

Answers (1)

pvorb
pvorb

Reputation: 7279

Yes there is. Simply add the following lines to your build.gradle.

dependencies {
    compile fileTree(dir: 'lib', includes: ['*.jar'])
}

Upvotes: 3

Related Questions