Using Doclava and Gradle to exclude classes from your generated Javadocs
At Nexmo I help out with the Java and Android client libraries. Recently I generated Javadocs for one of our Android client libraries. Usually, Android Studio makes this super easy. It’s as simple as using the “Generate JavaDoc” under the “Tools” menu. But I wouldn’t be writing a blog post if the problem I had to solve was so easy.
Our team wanted to exclude certain classes from the generated java docs. The engineers I was working with had already started that by using the
@hide annotation at the top of the classes we wanted excluded. But the problem is when you use Android Studio’s built in Javadoc generation tool, you’ll find that it doesn’t respect
@hide! So what to do?
The solution I found is to use Doclava (the original repo can be found on Google Code). Though the repo hasn’t been updated in a while, it still works.
There aren’t a lot of instructions out there how to integrate
Continue reading →