Share: (Gradle) Publish Kotlin Android Library to MavenCentral/JCenter


Hi all:

Two days ago, I want to publish my Android Library (Kotlin code) to MavenCentral/JCenter,
but i found there is a problem that i can’t generate Javadoc for kotlin file, and KDoc project has stalled !

BUT jetbrians developed dokka

BUT, Unforunately, dokka-android-gradle-plugin has not been released yet.

Finally, I use gradle to run the dokka-fatjar.jar command to generate Javadoc, then package and publish,

Here is my solution! Welcome any advice