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

added javadoc support (#1) #318

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

added javadoc support (#1) #318

wants to merge 1 commit into from

Conversation

kievitsp
Copy link

@kievitsp kievitsp commented Nov 8, 2021

  • added javadoc support

  • added javadoc test case

* added javadoc support

* added javadoc test case
@kievitsp
Copy link
Author

kievitsp commented Nov 8, 2021

This is initial implementation of adding the javadoc, and it would be good to get some feedback. For now this works only for functions and only for gradle. It works by adding an additional gradle task to trying to download the sources jar. This is done in a way to facilitate the javadoc jars in the future.

I couldn't find a way to provide the sources jars to the compiler, so i have created a separate service which will index jars and tries find the relevant sources jar on demand. This is synced with the classpath.

Also, I couldn't find a kotlin framework way of rendering out the kdoc, so for now it is building the mark down. The downside is that each different of source element, e.g. function, parameter, class, etc.

However, it would probably be best to get some feedback around the approach, to see if there is a better way of handling this. I have not looked into getting this to work with maven, however, maven does have nicer ways of downloading sources jars automatically.

Also, perhaps the downloading of sources jars in gradle should perhaps be optional?

Any feedback would great, thanks!

@fwcd
Copy link
Owner

fwcd commented Nov 8, 2021

Looks pretty cool, I hope to find some time to review it in detail soon, but thanks for the work involved in implementing this already.

If I recall correctly, we have some basic level of support for Javadoc already (#66), but extending this to all declarations (if possible) would of course be great. Regarding the source jars, I think @daplf did some work on fetching them for Maven projects in #292 already.

@daplf
Copy link
Contributor

daplf commented Nov 8, 2021

Hey. Source jars for maven are already supported as @fwcd mentioned (take a look at the class path resolvers code).

This looks really cool btw. In addition to fixing #309 (when javadoc is supported on all symbols), this would also fix #217 (gradle was missing).

@kievitsp
Copy link
Author

kievitsp commented Nov 9, 2021

Sounds good! I wouldn't mind helping out a bit more. It would be quite helpful is the project was formated more along the lines kotlin code standard. There was an issue related to linting #304

I wouldn't mind tackling that, but it would create a rather messy change.

@LifeIsStrange
Copy link

LifeIsStrange commented Jul 30, 2022

@kievitsp

Also, I couldn't find a kotlin framework way of rendering out the kdoc

Sorry maybe I am misunderstanding but couldn't dokka be used?
It can render html pages among other formats and IIRC extends Javadoc
https://github.com/Kotlin/dokka

@Dogacel
Copy link

Dogacel commented Apr 1, 2024

I feel like it is better to have something rather than nothing. I wonder if there is anything I can do to have this PR somehow working 🙂

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

Successfully merging this pull request may close these issues.

None yet

5 participants