You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[jnigen] Generate Dart Bindings with Javadoc/KDoc from Kotlin/Java Source #2819
Problem:
Currently, jnigen generates Dart bindings from Kotlin/Java classes, but it does not include Javadoc or KDoc comments from the source code
Suggestion:
When generating Dart bindings from Kotlin/Java code, jnigen should also extract the Javadoc/KDoc comments from the source files and include them as Dartdoc (///) in the generated Dart code.
Benefits:
Provides fully documented Dart bindings automatically.
Makes it easier for developers to understand and use the API.
For Example For Justing clear Idea:
class Example {
/// Calculate The Sum
fun sum(a:Int , b:Int) : Int {
return a+b
}
}
After Generating Dart Bindings for This Class
When Mouse Indicator The over the function it Show Information About Function as it same in Exists Java/Kotlin Code in IDE Like VSCode or Android Studio
it Show About Tasks of This Function
/// Calculate The Sum
void main(){
Example.sum(2,3) ;
}
changed the title [-][jnigen] Generating javadoc/KDoc[/-][+][jnigen] Generate Dart Bindings with Javadoc/KDoc from Kotlin/Java Source[/+]on Nov 24, 2025
I don't believe we take Java sources, we use mostly jars. And these don't have java doc. cc @liamappelbe to confirm.
You are Right At This Point
I have Suggestion If it Possible
System Suggestions read javadoc in html and convert it into Json Format Json Format standards can be read in any language.
As you say waiting @liamappelbe to confirm
@YahyaAtta If I understand correctly, your proposal is:
Locate the javadoc website for a particular API
Download the HTML
Parse it into a JSON format
Consume that format in JNIgen
Generate Dart docs for the APIs
The effort vs reward ratio on that plan doesn't seem favorable. Also, if javadoc ever changes its HTML format, your parser will break, so there's a maintenance burden there.
I'd say, skip steps 2-4 and just paste the URL to the javadocs in the Dart docs (ideally a link to the specific method's docs). That's 80% as good for 1% of the effort. It also neatly sidesteps potential copyright issues (tho INAL 🤷).
@YahyaAtta If I understand correctly, your proposal is:
Locate the javadoc website for a particular API
Download the HTML
Parse it into a JSON format
Consume that format in JNIgen
Generate Dart docs for the APIs
The effort vs reward ratio on that plan doesn't seem favorable. Also, if javadoc ever changes its HTML format, your parser will break, so there's a maintenance burden there.
I'd say, skip steps 2-4 and just paste the URL to the javadocs in the Dart docs (ideally a link to the specific method's docs). That's 80% as good for 1% of the effort. It also neatly sidesteps potential copyright issues (tho INAL 🤷).
I agree with your approach. To be honest, I don't have enough experience with this specific(Particular Coding) part yet. I'll leave this open for someone else to take over
Btw, it's not true that we only take JARs. I remember there was a plan to remove the source backend, but it looks like it hasn't happened yet. We still have both backends, and both are covered pretty well by integration tests.
So we only need this URL fallback if there's no javadoc for the method.
Activity
[-][jnigen] Generating javadoc/KDoc[/-][+][jnigen] Generate Dart Bindings with Javadoc/KDoc from Kotlin/Java Source[/+]HosseinYousefi commentedon Nov 24, 2025
We are copying the Javadoc when parsing from Java sources. Javadoc/KDoc are not available in the bytecode (jar) so we're not able to generate those. We could add a link to https://javadoc.io/ instead.
Siya-05 commentedon Jun 11, 2026
Can I work on this if it is still open?
dcharkes commentedon Jun 12, 2026
I don't believe we take Java sources, we use mostly jars. And these don't have java doc. cc @liamappelbe to confirm.
YahyaAtta commentedon Aug 3, 2026
You are Right At This Point
I have Suggestion If it Possible
System Suggestions read javadoc in html and convert it into Json Format Json Format standards can be read in any language.
As you say waiting @liamappelbe to confirm
liamappelbe commentedon Aug 4, 2026
@YahyaAtta If I understand correctly, your proposal is:
The effort vs reward ratio on that plan doesn't seem favorable. Also, if javadoc ever changes its HTML format, your parser will break, so there's a maintenance burden there.
I'd say, skip steps 2-4 and just paste the URL to the javadocs in the Dart docs (ideally a link to the specific method's docs). That's 80% as good for 1% of the effort. It also neatly sidesteps potential copyright issues (tho INAL 🤷).
YahyaAtta commentedon Aug 4, 2026
Yes You Can Work it still open
YahyaAtta commentedon Aug 4, 2026
I agree with your approach. To be honest, I don't have enough experience with this specific(Particular Coding) part yet. I'll leave this open for someone else to take over
Siya-05 commentedon Aug 20, 2026
@liamappelbe Would it be okay if I give this a quick patch based on the approach you suggested?
liamappelbe commentedon Aug 20, 2026
Sure, go for it.
liamappelbe commentedon Aug 20, 2026
Btw, it's not true that we only take JARs. I remember there was a plan to remove the source backend, but it looks like it hasn't happened yet. We still have both backends, and both are covered pretty well by integration tests.
So we only need this URL fallback if there's no javadoc for the method.