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

ios - Is 'init' forbidden as *part* of a variable name? -

file - Python: AttributeError: 'str' object has no attribute 'readlines' -

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