A PEP 517 build backend for KSProject-based packages that combines Java source injection (pyjnius-builder convention), Swift build support (pyswiftkit-builder), and Android Gradle configuration injection into a single backend.
Requires Python ≥ 3.13 (uses tomllib from the standard library and aligns
with the minimum version requirements of pyswiftkit-builder and pyjnius-builder).
[build-system]
requires = ["ksp-builder"]
build-backend = "ksp_builder"When present, ksp-builder generates a .gradle/<package_name>.json file and
injects it into the built wheel and sdist. ksproject can then discover and
merge these JSON files from all installed packages to assemble the final Gradle
build configuration (permissions, gradle dependencies, etc.).
[tool.kivy-school]
app_name = "MyApp"
[tool.kivy-school.android]
package_name = "org.example.myapp"
gradle_dependencies = [
"com.google.firebase:firebase-analytics:21.0.0",
]
permissions = [
"INTERNET",
"CAMERA",
]
[tool.kivy-school.android.meta_data]
"com.google.android.gms.ads.APPLICATION_ID" = "ca-app-pub-3940256099942544~3347511713"
Java source files are injected into the wheel and sdist under .java/, following
the pyjnius-builder convention.
[tool.pyjnius]
java-paths = ["java/"]If pyswiftkit-builder is installed and [tool.pyswiftkit] is configured,
swift build runs automatically before the wheel is assembled and the compiled
artifacts are injected into the wheel.
[tool.pyswiftkit]
products = ["mymodule"]