所谓动态任务,就是动态生成task,举例如下
4.times{counter-> task "hello6$counter"<<{ println("Hello World6$counter") } }
zhangliuningdeMacBook-Pro:learning-gradle-demo01 sherry$ gradle -q hello61 Hello World61 zhangliuningdeMacBook-Pro:learning-gradle-demo01 sherry$ gradle -q hello62 Hello World62
上述就生成了四个task任务
时间: 2024-11-10 16:16:18