moved Groovy version check higher up the class hierarchy