[英]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. 我想将不在Maven Central中的所有JAR文件依赖项放到Java项目的根目录下的
lib/
目录中。
Is there a way to make Gradle automatically add all JAR files in lib/
? 有没有办法使Gradle自动在
lib/
添加所有JAR文件?
Yes there is. 就在这里。 Simply add the following lines to your
build.gradle
. 只需将以下几行添加到
build.gradle
。
dependencies {
compile fileTree(dir: 'lib', includes: ['*.jar'])
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.