編輯 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


接下來看什麼

上一篇 / 下一篇
上一篇:Gradle Helloworld - Main Class 下一篇:Gradle helloworld task
延伸閱讀
訂閱 RSS: 總經 · 技術

Tags:

Updated: