没有工作任务的gradle罐子 [英] gradle task jar not working
问题描述
我想包括文件到我的.jar,但未能如愿,它说BUILD成功,但在classes.dex决不会包括在罐内......我真的从这个graddle东西强调...任何帮助是非常AP preciated,这里是我的任务的gradle:
I am trying to include a file into my .jar but failed to do so, it says BUILD SUCCESSFUL but the classes.dex is never included inside the jar... I'm really stressed from this graddle stuff... any help is very appreciated, here is my gradle task:
task jar(type: Jar) {
println( "WHAT" + "${buildDir}\\classes\\classes.dex")
include "${buildDir}\\classes\\classes.dex"
}
的println决心与正确的权限现有classes.dex,所以我看不出有任何麻烦,我甚至尝试复制出来的classes.dex,并直接引用它,它仍然失败。
println resolved to existing classes.dex with the correct permission, so I don't see any trouble, I even tried copied out the classes.dex and refer it directly, still it failed.
我使用的插件应用的Android库虽然不知道这是一个问题,如果我申请的插件Java作为它的工作原理...
I use apply plugin 'android-library' though not sure if that is the problem, if I apply plugin 'java' it works...
推荐答案
试图改变包含
从 <到 / p>
try to change include
to from
task jar(type: Jar) {
println( "WHAT" + "${buildDir}\\classes\\classes.dex")
from ("${buildDir}\\classes\\classes.dex")
}
这篇关于没有工作任务的gradle罐子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!