[Feature]: auto-discover Java sources bundled in pip installed packages

Author: T-DynamosCreated Aug 4, 2026Updated Aug 22, 2026
Labelsfeature-request

If a pip-installable package ships Java source files alongside its Python code, p4a has no way to pick those up automatically. The only supported path is Buildozer's android.add_src, which requires the app developer to add files manually.

Proposed solution

Right after the pip install stage in build.py scan the newly installed top level package directories for a fixed marker folder: android_java/ (for example). If a package contains one, register its path and send to gradle.

Optionally also delete that folder as it's not required/used.

Original idea by @kuzeyron.

CC: @AndreMiras