I’m attempting to write a plugin for a specific source generation tool (think grammar/lexer generator) , and I would like to call the tool using Project.javaexec(Closure) from within a subclass of SourceTask.
However, I can’t quite figure out how to create a closure to customize a JavaExecSpec from java. Is this even possible?
I’m tweaking an existing plugin that’s using an older version of gradle, and I’m trying to avoid bumping up the required gradle version. The javaexec override that accepts an Action seems to have been added more recently than what the plugin is using.
So it sounds like I’ll either have to switch to groovy for the SourceTask subclass so I can pass in a Closure, or bump up the gradle version so I can use an Action.