我正在使用gradle包装器来构建我的java项目。
最近我将我的gradle包装版本从1.0.3里程碑升级到了1.12。
我的build.gradle看起来像这样:
apply plugin: 'java'
<Some extensions to java plugin tasks>
...
...
...
task package(type: Zip) {
group = "Package"
destinationDir = file("./install")
baseName = "serverPackage"
version = project.version
into('someProject/bin') {
from('./bin') {
include '**/*.*'
}
}
into('someProject/config') {
from('./config') {
include '**/*.*'
}
}
into('someProject/config') {
from('./src/main/resources') {
include '**/*.*'
}
}
into('someProject/lib') {
from configurations.runtime
}
}
当我使用1.12版本运行命令'gradlew build'时,由于某种原因(不知道原因),在1.0.3版本中执行包任务时执行它
在版本1.0.3中,它看起来像这样:
:package
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes
:jar
:remoteInterfaceJar UP-TO-DATE
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test
:check
:build
BUILD SUCCESSFUL
在1.12版本中,它看起来像这样:
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes
:jar
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test
:check
:build
BUILD SUCCESSFUL
为什么1.12版本中没有执行包任务?
THX。