How to pass parameters or arguments into a gradle task

前端 未结 6 2002
独厮守ぢ
独厮守ぢ 2020-12-29 00:41

I have a gradle build script into which I am trying to include Eric Wendelin\'s css plugin - http://eriwen.github.io/gradle-css-plugin/

Its easy enough to implement,

6条回答
  •  既然无缘
    2020-12-29 01:45

    I think you probably want to view the minification of each set of css as a separate task

    task minifyBrandACss(type: com.eriwen.gradle.css.tasks.MinifyCssTask) {
         source = "src/main/webapp/css/brandA/styles.css"
         dest = "${buildDir}/brandA/styles.css"
    }
    
    etc etc
    

    BTW executing your minify tasks in an action of the war task seems odd to me - wouldn't it make more sense to make them a dependency of the war task?

提交回复
热议问题