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
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.pyscan 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