[英]Gradle to pull down dependencies into local lib dir
I have the following list of JAR dependencies (the following is my entire build.gradle
file): 我有以下JAR依赖项列表(以下是我的整个 build.gradle
文件):
apply plugin: 'java'
dependencies {
compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.3'
compile 'com.wordnik:swagger-annotations:1.3.4'
compile 'javax.validation:validation-api:1.0.0.GA'
compile 'io.dropwizard:dropwizard-core:0.7.0'
compile 'io.dropwizard:dropwizard-client:0.7.0'
compile 'com.wordnik:swagger-jaxrs_2.10:1.3.4'
compile 'org.eclipse.jetty:jetty-servlets:8.1.14.v20131031'
}
I would like to run Gradle and have it pull all of these JARs (and their transitive deps) from Maven and place the JARs in a local lib
directory. 我想运行Gradle并使其从Maven中提取所有这些JAR(及其传递的部门)并将JAR放置在本地lib
目录中。
When I run this I get a BUILD SUCCESSFUL
message, but I don't see a lib
directory under my main TestGradle
root` dir. 运行此命令时,我会收到一条BUILD SUCCESSFUL
消息,但主TestGradle
根目录下没有lib
目录。 I was expecting to see a directory that would contain all of these JARs as well as their transitive dependencies. 我期望看到一个包含所有这些JAR及其传递依赖项的目录。
Try to use separate 'compile' for each library. 尝试为每个库使用单独的“编译”。
This is how it looks on mine android project: 这是我的android项目上的样子:
dependencies {
compile 'com.google.android.support:wearable:+'
compile 'com.google.android.gms:play-services-wearable:+'
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.