:compileJava UP-TO-DATE
:compileGroovy
startup failed:
XDocletTask.groovy: 28: unexpected token: inputs @ line 28, column 3.
inputs.sourceDir( file(this.localMergeDir) )
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
It’s possible to define inputs and/or outputs for a custom task?
You get a syntax error because your inputs/outputs code is right in the class body, outside a method. Neither Groovy nor Java allows code in this location. You could move the code into a constructor.
The usual way to specify inputs and outputs for task classes is with annotations. Something like:
Thanks, I came from ant and I often forget that this is executable code. May be I’m too newbie, but I suggest to put this info in the section “create a custom task”, I didn’t spotted in any page of the docs. Thanks again, Luca