[英]How to download Android Gradle project external dependencies to a folder?
It's a similar problem to: How do I download my Gradle project external dependencies to a specific folder? 这与以下问题类似: 如何将Gradle项目的外部依赖项下载到特定文件夹?
with the addition of gradle "android" plugin. 加上gradle“ android”插件。
I tried this: http://forums.gradle.org/gradle/topics/how_can_i_gather_all_my_projects_dependencies_into_a_folder but there is no configurations.runtime
when building with android plugin. 我尝试了这个: http : //forums.gradle.org/gradle/topics/how_can_i_gather_all_my_projects_dependencies_into_a_folder,但是使用android插件构建时没有
configurations.runtime
。
if you run the command gradle dependencies
you'll see all the configurations.*
objects. 如果运行命令
gradle dependencies
, gradle dependencies
看到所有configurations.*
对象。
In particular you'll see that for each sourcesets we have: 特别是,您将看到每个资源集都有:
provided
compile
apk
For sourcesets other than the main
one, the name of the sourceset is used as a prefix. 对于
main
以外的其他资源集,该资源集的名称用作前缀。 This means you'll get things like 这意味着您将获得类似
debugCompile
releaseCompile
flavorCompile
(if you use flavors) flavorCompile
(如果使用调味料) provided
, and apk
as well. provided
,以及apk
。 All you have to do is query these different configuration objects to get their files. 您要做的就是查询这些不同的配置对象以获取其文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.