CodeNarc 1.5 with Grails 4

When I bumped CodeNarc from 1.4 to 1.5 at my Grails 4.x project, I kept getting the “groovy/text/TemplateEngine” error which is reported here: https://github.com/CodeNarc/CodeNarc/issues/449 The suggested solution was not too clear, so here is exactly what you gotta do – add the following to build.gradle: codenarc “org.codenarc:CodeNarc:${codenarc.toolVersion}” codenarc ‘org.codehaus.groovy:groovy-templates’