0

I have a little groovy script that just generates a small report about a special aspect of the source code. It is NOT required in the build process and it shall NOT be part of the resulting jar file. It's just a little script that will be run manually from time to time to get some special information.

Let's say the script is to be found here (outside of the src folder): ./misc/groovy-scripts/generate-special-report.groovy and it contains only println "Special report generated" (too keep things simple here). How can I run this groovy script from a gradle task, without having to provide an extra/additional groovy installation on the system?

Answers, ideas, tips and hints must not 100% satisfy the above mentioned requirements, I'm happy about any help/solution. But I hope there's an alternative solution to this one here: Running Groovy scripts from Gradle


[Edit] Maybe GroovyShell or GroovyScriptEngine is what I'm looking for as described in some comments here: Run groovy script from within gradle I'm going to give that a try.

Natasha
  • 516
  • 7
  • 24

0 Answers0