Passing varargs as second argument in Groovy in Gradle Tooling API

The problem is not the varargs. ApolloBuildProgressListener is implementing the wrong interface. There are two, an old one in the org.gradle.tooling package and the new one in the org.gradle.tooling.events package (which is what you need).