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

c# - Get the Class name in a class with atribute inside a attribute method -

java - How to compare two classes -

javascript - Why Selenium can't find an element that is graphically visible -