javadoc: Only run javadoc task is the jar task ran
The javadoc task needs the exported packages list produced by the jar
task.
@@ -47,6 +47,9 @@ javadoc {
if (JavaVersion.current().isJava8Compatible()) {
options.addStringOption('Xdoclint:none', '-quiet')
}
+ onlyIf {
+ jar.didWork
+ }
doFirst {
project.delete(destinationDir)
include bnd.project.getExports().collect { packageRef, attrs ->
