Dynamically setting publishDir
mode
#2403
-
Do closures only work if the entire directive is specified as a string? Based on the documentation for dynamic directives I was hoping a closure would work for
Here is my attempt:
with a I also tried putting the entire directive in a closure, but the module (as I'd expect) fails to compile. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm not sure you can use a closure there. However, you can go with plain Groovy and use this:
|
Beta Was this translation helpful? Give feedback.
-
This suggested change should also allow you to use actual closures there: #2432 |
Beta Was this translation helpful? Give feedback.
I'm not sure you can use a closure there. However, you can go with plain Groovy and use this:
publishDir params.output, mode: "${move ? 'move' : 'symlink'}"