Android Studio Javadoc: Cannot find symbol

后端 未结 2 577
半阙折子戏
半阙折子戏 2020-12-08 05:51

I\'m trying to prepare and upload my Android library to Bintray and part of that process runs the following javadoc task:

task javadoc(type: Javadoc) {
    s         


        
2条回答
  •  攒了一身酷
    2020-12-08 06:55

    You should also add all your dependency to the javadoc.classpath. Try this:

    task javadoc(type: Javadoc) {
        source = android.sourceSets.main.java.srcDirs
        classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    }
    
    afterEvaluate {
        javadoc.classpath += files(android.libraryVariants.collect { variant ->
            variant.javaCompileProvider.get().classpath.files
        })
    }
    

提交回复
热议问题