集册 Gradle 官中文方用户指南 给 task 加入描述

给 task 加入描述

欢马劈雪     最近更新时间:2020-08-04 05:37:59

129

你可以给你的任务加入一段描述性的文字. 它将会在任务执行的时候显示出来.

例子 15.18. 给任务加入描述

build.gradle

task copy(type: Copy) {
   description 'Copies the resource directory to the target directory.'
   from 'resources'
   into 'target'
   include('**/*.txt', '**/*.xml', '**/*.properties')
}