How to use Gradle to generate JavaDoc in Android Studio?

后端 未结 2 1441
傲寒
傲寒 2021-02-15 11:43

I can not find any documentation on how to configure my Gradle file to create the JavaDoc for my project. I already tried some snippets from SO and blog articles but none of the

2条回答
  •  走了就别回头了
    2021-02-15 12:23

    In android studio, write a gradle task of type Javadoc :

     task createJavadocs (type: Javadoc)
      {
            source = project.android.sourceSets.main.java.srcDirs
            options.linkSource true
            classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
            failOnError false
      }
    

    Simply execute this task will create javadocs.

提交回复
热议问题