It looks like in build.gradle you can just put:
codenarc { toolVersion = "0.20" } codenarcMain { configFile = rootProject.file("path/to/CodeNarcMain.groovy") } codenarcTest { configFile = rootProject.file("path/to/CodeNarcTest.groovy") }
If file names ( CodeNarcMain , CodeNarcTest ) is what you want them to be.
Groovy DSL documentation is here. If you need to configure a specific rule, review it in the documentation and if the rule has the public properties that it provides, they will be listed in the table in accordance with the specific documentation for the rules.
And it looks like you can change the format of the report file (HTML, XML, text, console), but not the actual file name.
smeeb source share