构建.gradle 是:
task copy(type: Copy, group: "Custom", description: "Copies sources to the dest directory") {
from "src"
into "dest"
println "copy"
}
task hello {
println "hello"
}
Run Code Online (Sandbox Code Playgroud)
当我尝试使用 时 ./gradlew copy, 和copy都hello被执行。输出如下:
> Configure project :
copy
hello
Run Code Online (Sandbox Code Playgroud)
我怎样才能只执行copy?