我正在使用gradle构建Java JAR文件,需要在存储库中添加一些属性和文本文件,但是包括它们不起作用。我目前具有以下瞬态依赖项:
jar {
baseName = 'myJarName'
version = '1.0.0'
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
include '**/*.json'
include '**/*.properties'
}
}
也尝试过:
jar {
baseName = 'myJarName'
version = '1.0.0'
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
from('src/main') {
include '**/*.json'
include '**/*.properties'
}
}