[GRADLE-3152] Regression: NullPointerException in Gradle 2.1-rc-1 Created: 21/Aug/14  Updated: 27/Aug/14  Resolved: 27/Aug/14

Status: Resolved
Project: Gradle
Affects Version/s: 2.1-rc-1
Fix Version/s: 2.1-rc-2

Type: Bug
Reporter: Gradle Forums Assignee: Marcin Erdmann
Resolution: Fixed Votes: 0


 Description   

Executing `gradle assemble` on [1]https://github.com/huxi/sulky throws a `NullPointerException` with Gradle 2.1-rc-1.

See [2]https://travis-ci.org/huxi/sulky/jobs... for the build and [3]http://pastebin.com/sZbtqEHy for the stacktrace.

The task that throws the exception looks like this:

task javadocAll(type: Javadoc) {
destinationDir = file("$buildDir/javadocAll")
source = files { subprojects.collect

{ it.sourceSets.main.java }

}
classpath = files { subprojects.collect

{ it.sourceSets.main.compileClasspath }

}
}

----------------------------------------------------------------------------------------
[1] https://github.com/huxi/sulky
[2] https://travis-ci.org/huxi/sulky/jobs/33060922
[3] http://pastebin.com/sZbtqEHy



 Comments   
Comment by Gradle Forums [ 21/Aug/14 ]

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

Comment by Gradle Forums [ 21/Aug/14 ]

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

Comment by Marcin Erdmann [ 21/Aug/14 ]

Looks like JavaToolChain should be injected directly into Javadoc task instead of via JavaBasePlugin. JavCompile might be affected as well.

Generated at Wed Jun 30 12:41:19 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.