将所有项目文件添加到jar中对我来说解决了这个问题。我将以下行添加到我的
build.gradle
jar { manifest { attributes ... } // This line of pre recursively collects and copies all of a project's files // and adds them to the JAR itself. One can extend this task, to skip certain // files or particular types at will from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }}
更新
:改变
configurations.compile.collect以
configurations.compileClasspath.collect根据本下面的答案。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)