Is there a way to embed javadoc (/doc folder produced by JavaDoc Ant Task) into my library jar which contains my .class files?
I would prefer not to ship source and would like the users to be able to see the javadoc comments in eclipse without having to go through Referenced Libraries tab and adding the JavaDoc zip to my third-party lib.
Sure you can put javadoc into your binary JAR file ... but does it really make sense?
In order to read the javadocs, a user is going to have to unpack the HTML files from the JAR file into the Android's filesystem, and then point the Android browser at the index.html file (or whatever). But the best model for using JAR file to run your code is NOT to unpack it. And if you don't expect your users to try to view the javadoc on their phones (!?!) ... then putting the javadocs into the JAR file is "dead weight".
It makes much more sense to distribute the javadoc tree in a separate zip or tar file.
Finally, if you expect users to develop code against the APIs in your product, it will be a lot easier for them if you provide them with source code. You'll get better customer satisfaction, fewer support requests to help them debug their code, and fewer unjustified complaints about your code not working.
Sure you can update a jar file this way.
jar uf <your_jar> doc/<your doc file>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With