One thing you could try is the new extension mechanism. If you aren’t passing in too many classes it might be easier to use a method syntax, rather than a closure syntax.
extensions.rmic = new RmicExtension()
rmic.classes 'abc.dd.class1', 'abc.dd.class2'
class RmicExtension {
List classes = []
void classes(String... classes) {
this.classes.addAll(classes)
}
}