[英]Add a local jar file to dependencies of a project in gradle
I have two java projects. 我有两个Java项目。 The first one builds a jar archive with
so
libraries: 第一个建立一个JAR归档
so
库:
jar {
from('libs') {
include '**/*.so'
into('native-libs')
}
}
so
files are included in the first jar. so
文件包含在第一个jar中。
The second one depends on the first and should include all files from the first. 第二个依赖于第一个,并且应包括第一个中的所有文件。 I write:
我写:
dependencies {
compile project(':project-native')
}
but in the second jar I don't see files from the first project. 但是在第二个jar中,我看不到第一个项目中的文件。
Any ideas? 有任何想法吗?
A project dependency adds the dependent JAR file to the classpath of that project. 项目依赖项将依赖的JAR文件添加到该项目的类路径中。 It does not merge the classes into its JAR file.
它不会将这些类合并到其JAR文件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.