How to extend gradle war task with dofirst/dolast -


i need extend gradle war task dofirst , dolast commands compile sencha frontend in production state.

i know extend task need add task.dofirst {} not working war. did tests using other tasks like

clean {     dofirst {         println "test"     } } 

this working ... war isn't

war {     dofirst {         println "test"     } } 

my main idea remove src/main/webapp from list , execute sencha-cmd sencha app build -c --destination $war/ production

you should create separate task sencha compilation it's own inputs/outputs gradle can perform up-to-date checking (so can skipped if not necessary). can wire task gradle dag via task.dependson(...)

task compilesencha(type:exec) {     inputs.dir 'src/main/sencha'     outputs.dir "$builddir/sencha"     commandline 'sencha', 'app', 'build', file('src/main/sencha').absolutepath, file("$builddir/sencha").absolutepath }  war {    "$builddir/sencha"    dependson compilesencha } 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -