Regression: NullPointerException in Gradle 2.1-rc-1

Executing ‘gradle assemble’ on throws a ‘NullPointerException’ with Gradle 2.1-rc-1.

See for the build and for the stacktrace.

The task that throws the exception looks like this:

task javadocAll(type: Javadoc) {
 destinationDir = file("$buildDir/javadocAll")
 source = files { subprojects.collect { } }
 classpath = files { subprojects.collect { it.sourceSets.main.compileClasspath } }

Am I right in assuming that you’re not applying the ‘JavaBasePlugin’ to the project that contains this task definition?

Correct. I only apply ‘BasePlugin’. It’s a multi-module-project build were this task in the rootproject produces the javadoc for all subprojects.