chrisbanes / gradle-mvn-push

Helper to upload Gradle Android Artifacts to Maven repositories
Apache License 2.0
1.05k stars 283 forks source link

Configure Javadoc Tasks with Android Refernce #9

Closed JakeWharton closed 10 years ago

JakeWharton commented 10 years ago

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

JakeWharton commented 10 years ago

Something like this:

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

where plugin is an instance of AppPlugin or LibraryPlugin.

JakeWharton commented 10 years ago

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

vRallev commented 10 years ago

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

paulpv commented 10 years ago

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

chrisbanes commented 10 years ago

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

mcxiaoke commented 10 years ago

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
}
rharter commented 10 years ago

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?

mcxiaoke commented 10 years ago

@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)) }