我使用Gradle的Java项目,我想在每个特定目录中导出项目依赖项。
此处为build.gradle
:
apply plugin: 'java-library'
apply plugin: 'eclipse'
project.ext.jserialcomm = "[2.0.0,3.0.0)"
version = "ALPHA-0.0.1"
repositories {
jcenter()
mavenCentral()
}
dependencies {
compile "com.fazecast:jSerialComm:${jserialcomm}"
}
(这里我只有一个依赖)
目前我的jar输出文件如下所示:
.zip
├─ assets
│ └─ (all assets stored here)
├─ io
│ └─ (compiled classes, 'io' is the base package)
└─ META-INF
└─ MANIFEST.MF
但我希望它看起来像这样:
.zip
├─ assets
├─ io
├─ META-INF
└─ libs
├─ jserialcomm (I want to customize this identifier)
│ └─ 2.0.2
│ └─ jSerialComm-2.0.2.jar (here the dependency jar)
└─ {other_dep}
└─ {other_dep_version}
└─ {other_dep_jar}