How do I reuse task configuration in Gradle? -


i have task war configuration many from/include/exclude:

task war {     exclude     exclude     ...      ... ...      ... ...  } 

i have task war configuration same except 1 exclude. don't want duplicate configurations. how can reuse first configuration?

try:

ext.sharedcopyconf = { task, ->   configure(task) {         'a'   } }  task copy1(type: copy) { t ->   sharedcopyconf(t, 'b') }  task copy2(type: copy) { t ->   sharedcopyconf(t, 'c') } 

have @ demo.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -