[英]Gradle Javadoc task without warnings
I generate a javadoc .jar file with Gradle for my Android project. 我为我的Android项目生成了一个带有Gradle的javadoc .jar文件。 I'm using a similar setup like in this instruction .
我正在使用类似于此指令的类似设置。
But I'm getting a lot of warnings that many symbols are missing. 但是我收到很多警告,许多符号都丢失了。 I noticed that the javadoc task doesn't find any of my dependencies.
我注意到javadoc任务找不到任何依赖项。 How can I add my dependencies to javadoc task's classpath?
如何将我的依赖项添加到javadoc任务的类路径?
Here is my upload task: 这是我的上传任务:
afterEvaluate { project ->
uploadArchives {
//...
}
//...
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.allJava
}
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}
//...
artifacts {
archives androidSourcesJar
archives androidJavadocsJar
}
}
There is also filed bug , but I'd like to have a solution now. 还有提交的错误 ,但我现在想要一个解决方案。
roman-mazur answered the question in another issue at Github. roman-mazur在Github的另一期杂志中回答了这个问题。
There is currently a discussion going on, whether it's the right way. 目前正在进行讨论,是否是正确的方式。 But for the moment adding these lines solved my issue:
但目前添加这些线条解决了我的问题:
afterEvaluate {
javadocs.classpath += files(android.plugin.runtimeJarList)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.