Gradle Helloworld Task 入門
編輯 build.gradle
task helloworld {
println "Hello world"
}
列出所有 task 並找到 helloworld
$gradle tasks --all
...
Other tasks
-----------
helloworld
prepareKotlinBuildScriptModel
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
執行 task
$ gradle helloworld
> Configure project :
Hello world
BUILD SUCCESSFUL in 931ms