Basic test using: https://appetize.io/
Chaquopy is distributed as a plugin for Android’s Gradle-based build system.
-
In your top-level
build.gradle
file, set the Chaquopy version:plugins { id 'com.chaquo.python' version '13.0.0' apply false }
-
In the module-level
build.gradle
file (usually in the app directory), apply the Chaquopy plugin after the Android plugin:plugins { id 'com.chaquo.python' }
-
The Python interpreter is a native component, so you must use the abiFilters setting to specify which ABIs you want the app to support. In the module-level
build.gradle
file (usually in the app directory), apply the ABI filter inside of theAndroid
plugin:android { ... defaultConfig { ndk { abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" } } ... }
-
Set
buildPython
. In the module-levelbuild.gradle
file (usually in the app directory), apply thebuildPython
inside of theAndroid
plugin:android { ... python { buildPython "python" } ... }
-
Add source code. To include Python source code from other directories, use the
android.sourceSets
block. In the module-levelbuild.gradle
file (usually in the app directory), apply thesourceSets
inside of theAndroid
plugin:android { ... sourceSets { main { python.srcDir "src/main/python/OSNMA" } } ... }
-
Set startup. If the app only sometimes uses Python, then call Python.start() after first checking whether it’s already been started::
if (! Python.isStarted()) { Python.start(new AndroidPlatform(context)); }
- Create the pipeline for GitHub.
- Bring OSNMA src code as submodule.