2017-07-28 37 views

回答

0

我想这会奏效。

请通过此链接。 https://discuss.gradle.org/t/download-some-dependencies-and-copy-them-to-a-local-folder/6246

可能帮助您解决您的疑虑。

你可以试试这个。添加下面的代码中的build.gradle

task copyRuntimeLibs(type: Copy) { 
    into "lib1" 
    from configurations.compile 
    } 

对我来说这worked.All与编译依赖依赖的jar将被复制到文件夹LIB1,一旦我们运行此任务。

在你的情况下,用替换编译 libsJS

task copyRuntimeLibs(type: Copy) { 
     into "lib-js" //specify the required location 
     from configurations.libsJS 
     } 
+0

感谢您的建议,但我的问题更多:我如何收集和使用依赖项字段(组,名称,版本)复制到特定位置。 – GaetanZ

+0

所以你想要所有的依赖项存储在一个lib文件夹中,构建完成了吗? @GaetanZ –

+0

在类似lib-js/io.deps/artefact1/1.1.1的目录中 – GaetanZ