我正在尝试从特定的类包中构建一个JAR,所以我想从这个JAR中排除所有其他包 . 这就是我所拥有的......
task receiverJar(type: Jar) {
baseName = "receivers"
from sourceSets.main.output
include 'com/foo/receivers/**'
exclude 'com/foo/cli/**'
exclude 'com/foo/tdl/**'
with jar
}
当我执行 gradle receiverJar
时,我仍然在我的JAR文件中获得所有其他包和类 .