kivy / kivy/python-for-android

Proposal: Android-Specific Metadata Support in Recipes

Open
#3,179 3 comments 3 reactions 0 assignees View on GitHub
need-discussion
Dominant language
Python
Stars
8.9k
Forks
2k
Avg merge
12h 20m
Merged PRs (30d)
9

Description

Introduce support in python-for-android to parse Android-specific metadata from pyproject.toml of pip-installed packages. This enables modular bundling of assets into APK builds, allowing packages to contribute platform-native components directly.

## Example pyproject.toml Layout

```toml
[tool.python-for-android.android]
src = "android/src/"
res = "android/res/"
extra_manifest_xml = "android/extra_manifest.xml"
extra_manifest_application_xml= "android/extra_manifest_application.xml"
activities = [
{
"name": "org.package.android.MyActivity",
"process": ":package_process",
}
]
proguard = "android/proguard-rules.txt"
jniLibs = "android/jni/"
assets = "android/assets/"
resources = "android/resources"

etc. Etc.
```

## How It Works

- During dependency resolution (p4a.recipe or pip stage), check for [tool.python-for-android.android] in pyproject.toml.
- Resolve declared paths from the site-packages directory.
- Inject collected files into dists//build/ before Gradle build.

Please consider this.

THANKS!!

Contributor guide

Open the contributing guide

Research direction

Start by reading the dependency-resolution flow around p4a.recipe or the pip stage, then inspect how pyproject.toml metadata and site-packages paths are currently handled. Trace where files enter dists//build/ before the Gradle build. Done means an agreed design and implementation path for collecting the declared Android metadata and bundling it into APK builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, python
Domain
build-system, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.