Skip to content

docs(android): add Java API Reference (Javadoc) link, sidebar entry, …#19508

Open
madhesh60 wants to merge 4 commits into
pytorch:mainfrom
madhesh60:docs/android-javadoc-fix
Open

docs(android): add Java API Reference (Javadoc) link, sidebar entry, …#19508
madhesh60 wants to merge 4 commits into
pytorch:mainfrom
madhesh60:docs/android-javadoc-fix

Conversation

@madhesh60
Copy link
Copy Markdown

@madhesh60 madhesh60 commented May 12, 2026

Summary

Fixes #19356 — Unify and Improve the Android dev story

Changes

  • Added Java API Reference (Javadoc) link to using-executorch-android page (1-line fix)
  • Added Javadoc entry to Android sidebar navigation
  • Created package-info.java for org.pytorch.executorch with overview and quick-start
  • Created package-info.java for org.pytorch.executorch.extension.llm
  • Created overview.html with top-level intro, quick-start code, and package descriptions
  • Updated build.gradle to pass -overview flag so overview.html is picked up by the build

Testing

All are verified by opening the documents manually.

  • Added a "Java API Reference" hyperlink directly in the using-executorch-android page → trivial 1-line fix
Screenshot 2026-05-12 124608
  • Added sidebar/nav entry under Platforms → Android → "Java API Reference (Javadoc)"
Screenshot 2026-05-12 124524
  • Improved the bare javadoc/index.html with an overview, quick-start code, and package descriptions
Screenshot 2026-05-12 124548

cc @mergennachin @AlannaBurke @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 12, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19508

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

⚠️ 11 Awaiting Approval

As of commit 1bef3c9 with merge base 7dbd972 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 12, 2026

Hi @madhesh60!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@github-actions github-actions Bot added docathon-2026 easy Easy Difficulty for issues as part of PyTorch Docathon H1 2026 module: doc Issues related to documentation, both in docs/ and inlined in code labels May 12, 2026
@madhesh60
Copy link
Copy Markdown
Author

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot Bot added the release notes: none Do not include this in the release notes label May 12, 2026
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 12, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 12, 2026
@GregoryComer GregoryComer requested a review from psiddh May 15, 2026 22:15
@psiddh
Copy link
Copy Markdown
Contributor

psiddh commented May 15, 2026

There are few lint errors that need to be resolved before it can land

@psiddh
Copy link
Copy Markdown
Contributor

psiddh commented May 15, 2026

@claude review the task and this PR

@claude
Copy link
Copy Markdown

claude Bot commented May 15, 2026

Claude finished @psiddh's task in 3m 7s —— View job


PR Review: docs(android) - Java API Reference (Javadoc)

  • Gather context and read changed files
  • Review documentation changes (markdown files)
  • Review Java source changes (package-info.java files)
  • Review build configuration changes (build.gradle)
  • Review new file (overview.html)
  • Check lint failures and provide recommendations
  • Post final review

Overall Assessment

The intent of this PR is good — adding Javadoc overview content, sidebar navigation, and linking to the API reference. However, there are 2 CI failures caused by this PR that must be fixed before landing:


CI Failure #1: android-java-format

Both package-info.java files fail google-java-format checks. Fix by running:

google-java-format -i \
  extension/android/executorch_android/src/main/java/org/pytorch/executorch/package-info.java \
  extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/package-info.java

CI Failure #2: link-check / lint-urls

Three URLs introduced by this PR return 404:

URL Files Issue
https://pytorch.org/executorch/main/cross-compilation-for-android.html package-info.java, overview.html This page does not exist — no cross-compilation-for-android.md doc file exists in the repo
https://github.com/pytorch/executorch/tree/main/examples/demo-apps/android package-info.java, overview.html This directory was moved to meta-pytorch/executorch-examples
https://github.com/pytorch/executorch/tree/main/examples/demo-apps/android/LlamaDemo llm/package-info.java Same — moved to the external examples repo

Suggested fixes:

  • Remove or replace the cross-compilation-for-android.html link (the page doesn't exist)
  • Update the demo app links to point to https://github.com/meta-pytorch/executorch-examples (e.g., https://github.com/meta-pytorch/executorch-examples/tree/main/llm/android/LlamaDemo for the Llama demo)

Code Review Notes

docs/source/android-section.md — Looks good. The addition of :maxdepth: 1 and the closing ``` fence is a nice fix (the original toctree was technically unclosed). The external toctree entry for Javadoc is correct syntax.

docs/source/using-executorch-android.md — Minor change from /javadoc/ to /javadoc/index.html. The link-check shows this resolves (200 OK), so this is fine.

extension/android/executorch_android/build.gradle — The Javadoc task generation looks reasonable. One minor concern: variant.name.capitalize() is deprecated in Groovy 4+ (which newer Gradle versions use). Consider using variant.name.capitalize() with a note or switch to variant.name.substring(0,1).toUpperCase() + variant.name.substring(1) for future-proofing. Not blocking.

package-info.java files — Content is high quality with good quick-start examples and {@link} references to real classes (all verified to exist). The only issues are formatting (see CI failure above) and broken external links.

overview.html — Clean HTML with useful package summary table. Same broken link issues as above.


Summary

The content quality is solid. To land this PR, @madhesh60 needs to:

  1. Run google-java-format -i on both package-info.java files
  2. Fix/remove the 3 broken URLs (dead cross-compilation page + moved demo-apps links)

@psiddh
Copy link
Copy Markdown
Contributor

psiddh commented May 15, 2026

Agree with Claude review, fix the two broken CI issues + rebase and this should be good to land. lgtm overall.
Thanks for your contribution @madhesh60

@madhesh60
Copy link
Copy Markdown
Author

@psiddh Thanks for the review! I will fix them and update the broken links. Will push the changes shortly.

@madhesh60
Copy link
Copy Markdown
Author

madhesh60 commented May 16, 2026

Hi @psiddh, while fixing the broken links, I noticed the CI also flagged a 404 in a completely different file docs/source/backends/arm-ethos-u/arm-ethos-u-overview.md is pointing to https://docs.pytorch.org/executorch/stable/tutorial-arm-ethos-u.html which no longer exists.

image

This is unrelated to my changes. Should I fix this as part of this PR, or would you prefer I open a separate issue for it?

@psiddh
Copy link
Copy Markdown
Contributor

psiddh commented May 16, 2026

Hi @psiddh, while fixing the broken links, I noticed the CI also flagged a 404 in a completely different file docs/source/backends/arm-ethos-u/arm-ethos-u-overview.md is pointing to https://docs.pytorch.org/executorch/stable/tutorial-arm-ethos-u.html which no longer exists.

This is unrelated to my changes. Should I fix this as part of this PR, or would you prefer I open a separate issue for it?

Would be nice if you can, o/w not sure how we can get past this CI error

@github-actions github-actions Bot added the module: arm Issues related to arm backend label May 16, 2026
@madhesh60
Copy link
Copy Markdown
Author

@psiddh sir, I have resolved the CI and also synced with the latest main branch to clear the link-check errors.
The PR is ready for your final review. Thank You.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 16, 2026

The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:

  • ciflow/trunk

Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows.

@madhesh60 madhesh60 requested a review from psiddh May 16, 2026 11:57
@madhesh60
Copy link
Copy Markdown
Author

@psiddh Due to a few CI failures, I have committed a few new changes. Please review them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. docathon-2026 easy Easy Difficulty for issues as part of PyTorch Docathon H1 2026 module: arm Issues related to arm backend module: doc Issues related to documentation, both in docs/ and inlined in code release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify and Improve the Android dev story

3 participants