Support nested mediapipe dir in Java API doc builder.

PiperOrigin-RevId: 487735796
This commit is contained in:
Mark McDonald 2022-11-10 23:11:15 -08:00 committed by Copybara-Service
parent f329e38dc1
commit 185a57cec5

View File

@ -45,6 +45,12 @@ def main(_) -> None:
while (mp_root := mp_root.parent).name != 'mediapipe':
# Find the nearest `mediapipe` dir.
pass
# Externally, parts of the repo are nested inside a mediapipe/ directory
# that does not exist internally. Support both.
if (mp_root / 'mediapipe').exists():
mp_root = mp_root / 'mediapipe'
java_root = mp_root / 'tasks/java'
gen_java.gen_java_docs(