build.gradle file, task using << notation, intellij warns: “Cannot infer argument type”

后端 未结 5 2291
眼角桃花
眼角桃花 2021-02-19 00:42

I\'m new to groovy and gradle and was wondering whether someone knew why my scriplet wasn\'t working (edit actually it does work but the warning still appears). This section is

5条回答
  •  情话喂你
    2021-02-19 01:00

    For the workaround, you should really call was was indicated by the << (doLast)

     task hellofun() {
       doLast {
         [silly:'billy'].each { k, v ->
           println "$k=$v"
         }
       }
     }
    

提交回复
热议问题