zoukankan      html  css  js  c++  java
  • Gradle Goodness: Group Similar Tasks

    In Gradle we can assign a task to a group. Gradle uses the group for example in the output of $ gradle -t to output all the tasks of the same group together. We only have to set the group property with a value and our task belongs to a group.

    In the following sample we add the tasks hello and bye to the group Greeting:

    00.def GREETING_GROUP = 'Greeting'
    01. 
    02.task hello << {
    03.println 'Hello Gradle!'
    04.}
    05.hello.group = GREETING_GROUP
    06.hello.description = 'Say hello.'
    07. 
    08.task bye {
    09.description= 'Say goodbye.'
    10.group = GREETING_GROUP
    11.}
    12.bye << {
    13.println 'Goodbye.'
    14.}

    If we run $ gradle -t we get the following output:

    :tasks
     
    ------------------------------------------------------------
    Root Project
    ------------------------------------------------------------
     
    Greeting tasks
    --------------
    bye - Say goodbye.
    hello - Say hello.
     
    Help tasks
    ----------
    dependencies - Displays a list of the dependencies of root project 'taskgroup'.
    help - Displays a help message
    projects - Displays a list of the sub-projects of root project 'taskgroup'.
    properties - Displays a list of the properties of root project 'taskgroup'.
    tasks - Displays a list of the tasks in root project 'taskgroup'.
     
    To see all tasks and more detail, run with --all.
  • 相关阅读:
    用word2010发个blog
    停止调试无法关闭控制台
    D11.5.8,Lingo中不支持AS3的ExternalInterface接口
    Lingo03 通用脚本和自定义handler
    Lingo01 术语
    Lingo09 Sprite
    Lingo动态创建script member
    tut11脚本基础
    诡异失败的导入对话框
    Lingo3D01 3D Cast Member的组成
  • 原文地址:https://www.cnblogs.com/GoAhead/p/4189159.html
Copyright © 2011-2022 走看看