Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Javadoc Tasks with Android Refernce #9

Closed
JakeWharton opened this issue Jan 8, 2014 · 8 comments
Closed

Configure Javadoc Tasks with Android Refernce #9

JakeWharton opened this issue Jan 8, 2014 · 8 comments

Comments

@JakeWharton
Copy link

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

@JakeWharton
Copy link
Author

Something like this:

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

where plugin is an instance of AppPlugin or LibraryPlugin.

@JakeWharton
Copy link
Author

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

@vRallev
Copy link

vRallev commented Feb 3, 2014

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

@paulpv
Copy link

paulpv commented Feb 11, 2014

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

@chrisbanes
Copy link
Owner

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

@mcxiaoke
Copy link

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
Copy link

rharter commented Apr 9, 2014

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants