An illegal reflective access operation has occurred
Groovy 2.4 was released 21 Jan 2015, and it has reached end of life. JDK 11 was released on September 25, 2018 (with long-term-support [LTS]). And bringing both together in a modern IDE results in an WARNING: An illegal reflective access operation has occurred, when running a script.

Finally, I was able to get rid of that message:
Chose newer JVM for local developmentLast updated