Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Javadoc integration, update to minimum JDK 9 #22

Open
cjbrooks12 opened this issue May 19, 2021 · 4 comments
Open

Rewrite Javadoc integration, update to minimum JDK 9 #22

cjbrooks12 opened this issue May 19, 2021 · 4 comments

Comments

@cjbrooks12
Copy link
Member

cjbrooks12 commented May 19, 2021

The current Javadoc tool was deprecated in JDK 9, and removed entirely in JDK 13. Thus, Kodiak's Javadoc integration only runs in older JDKs < 13.

Kodiak should be updated to use the new JDK Javadoc structure.

Like the new Dokka integration, it would be nice to distribute this integration as a standalone Javadoc plugin, which can be configured to run on its own directly within Gradle for proper dependency/type information.

Note that this should really only be a rewrite of the javadoc-formatter project, and minor updates to javadoc-runner to work with the new CLI. javadoc-models likely should not need any changes.

@Andre601
Copy link

I generally would apreciate this to be updated... I'm looking for a Javadoc tool/plugin that could allow an output to JSON for javadocs, but so far there has been nothing to use here, as the provided results either are using the mentioned outdated Javadoc API, or don't explain anything to make things work in newer versions...

Also, should this be rewritten into a plugin would I hope it also supports Maven. Not everyone uses nor likes Gradle and Maven is still an option people (including me) use.

I really hope there will be any progress in the future, as I'm desperately searching for a solution here...

@cjbrooks12
Copy link
Member Author

Unfortunately, the project that this library was originally written for, Orchid, was abandoned, and I just don't have time to revive Orchid or Kodiak since I'm no longer using them. And they never got enough adoption for anyone else to help out with maintenance, either.

You don't really have many folks maintaining doclets, especially since Java 9 made a replacement API, and while I haven't looked recently, there's probably not anything else off the shelf to produce what you need. And the method used here, a fully new CLI tool for calling a custom doclet, just wasn't sustainable. Your best bet would be to make a new library based on the new Doclet API, publish it to Maven Central, then use that library as an alternate doclet in your normal Maven setup.

@Andre601
Copy link

The main issue I have with this is what I mentioned before, which is that the overall explanation is written in such a way that it expects you to have fairly decent knowledge of this stuff... At least it feels like this to me.

I would've already tried and worked on this, if it was easy to understand, but unfortunately is there no docs that explain it in a beginner friendly way and those docs that do are for the old system...

@cjbrooks12
Copy link
Member Author

As a starting point, you might fork this repo which builds and publishes a custom Doclet with the new API. From there, remove the code you don't need, then just start playing around with the classes the Doclet API gives you. Try printing stuff out until you find how to access the names of classes, functions, etc. and generally get a better understanding of how the tool works. Then you can start building the actual JSON output from there. You might also try asking ChatGPT or GitHub Copilot for more specific direction on building the Doclet, once you've got it set up.

That said, I might be willing to build this Doclet as a contractor for you or your company, where I'd build the initial project for a fee, then deliver it to you for ongoing maintenance. But I just don't have time to revive this project or do work for free, when I don't personally use it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants