chrisbanes / gradle-mvn-push

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

Add provided dependencies to classpath of androidJavadocs #43

Open jfresen opened 9 years ago

jfresen commented 9 years ago

I'm using provided dependencies in my library project, which works fine but for one issue. When the uploadArchives task executes the androidJavadocs task, it gives compiler errors (interpreted by androidJavadocs as warnings) for all references to the provided dependencies. Is there a way in which I can add the provided dependencies to the classpath of androidJavadocs?

mathieudebrito commented 9 years ago

+1

koral-- commented 9 years ago

I encountered the same problem.

It looks that path needs to be appended here: https://github.com/chrisbanes/gradle-mvn-push/blob/master/gradle-mvn-push.gradle#L97

If you are using apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle' that snippet should do the trick:

afterEvaluate { project ->
    android.libraryVariants.all { variant ->
        tasks.androidJavadocs.doFirst {
            classpath += files(variant.javaCompile.classpath.files)
        }
    }
}
MerlinYu commented 8 years ago

@jfresen I meet the error :Could not get unknown property 'android' for task ':androidJavadocs' Did you solve your problem?

drakeet commented 7 years ago

I have fixed it in my library using: https://github.com/drakeet/MultiType/commit/ef940c03e2d3694e40c4257a590b3f1133fa4b79

Maybe I could create a PR for the project? @chrisbanes