chrisbanes / gradle-mvn-push

Helper to upload Gradle Android Artifacts to Maven repositories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configure Javadoc Tasks with Android Refernce

JakeWharton opened this issue · comments

Configure the javadoc tasks' classpath with Android's bootclasspath. Otherwise references to Android classes cause warnings or failures when building.

Something like this:

classpath += project.files(plugin.getRuntimeJarList().join(File.pathSeparator))

where plugin is an instance of AppPlugin or LibraryPlugin.

The absence of this is causing errors on Java 8 that are only warnings on Java 7.

Is there currently a solution? The warnings are very annoying. I tried to get access to all compile dependencies, but I failed.

Ah, now I see that this may be what I tried to solve in #13.

I've just pushed b46dfc3 to dev which may fix this. Can't test until I get home though.

There are so many javadoc errors, I add this line to avoid build failure:

task androidJavadocs(type: Javadoc) {
    // add this line
    failOnError false
    source = android.sourceSets.main.allJava
}

Was this ever resolved? I can't seem to add the androidJavadocs task because I get Cannot add task ':ViewPager:androidJavadocs' as a task with that name already exists.. @mcxiaoke Where do you add that?

@rharter modify gradle-mvn-push.gradle:

task androidJavadocs(type: Javadoc) {
failOnError false // add this line
source = android.sourceSets.main.allJava
classpath += project.files(android.plugin.getRuntimeJarList().join(File.pathSeparator))
}