Skip to content

Commit 61a25f7

Browse files
committed
Update Android build configuration and requirements for improved compatibility
- Modify tag trigger in GitHub Actions to prevent unintended builds - Update source.include_exts to include additional file types - Refine requirements in buildozer.spec and various requirements files by removing unnecessary dependencies and updating Kivy version - Adjust Android API levels for better support
1 parent 837f161 commit 61a25f7

File tree

5 files changed

+17
-20
lines changed

5 files changed

+17
-20
lines changed

.github/workflows/android.build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ name: Build Android APK
44
on:
55
push:
66
tags: # Trigger on tags like v*.*.*
7-
- 'v*.*.*'
7+
- 'NEVER-MATCH-v*.*.*'
8+
workflow_dispatch: # Allows manual triggering if needed
9+
10+
811
jobs:
912
build-android:
1013
runs-on: ubuntu-latest

buildozer.spec

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ source.dir = src
1717
source.main_py = fiscalberry/gui.py
1818

1919
# (list) Source files extensions to include
20-
source.include_exts = py,png,jpg,kv,atlas,json,pem,crt # Add other extensions if needed (e.g., fonts, sounds)
20+
source.include_exts = py,png,jpg,kv,atlas,json,svg,pem,crt,ico # Add other extensions if needed (e.g., fonts, sounds)
2121

2222
# (list) List of inclusions using pattern matching (relative to source.dir)
2323
# Include assets and the capabilities.json at the root of src
@@ -41,8 +41,9 @@ version.filename = %(source.dir)s/fiscalberry/__init__.py
4141
# (list) Application requirements
4242
# Comma-separated list of recipes or pure-Python packages.
4343
# IMPORTANT: Verify each requirement. Check if python-for-android recipes exist for non-pure-Python libs.
44-
# Remove unnecessary dependencies (like pika if not used on mobile, pywin32, argparse).
45-
requirements = hostpython3,python3,kivy==2.3.0,python-escpos,python-socketio[client],requests,aiohttp,pillow,python-barcode[images],qrcode[pil],appdirs,platformdirs,pyjnius
44+
# Remove unnecessary dependencies (like pika if not used on mobile, pywin32,).
45+
requirements = hostpython3,python3,kivy[base],python-escpos[image,qrcode,usb,serial],python-socketio[client],requests,platformdirs,pyjnius
46+
4647
4748
# (str) Presplash of the application
4849
presplash.filename = %(source.dir)s/fiscalberry/ui/assets/fiscalberry.png
@@ -82,13 +83,13 @@ android.permissions = INTERNET, FOREGROUND_SERVICE, ACCESS_NETWORK_STATE
8283
# android.features = android.hardware.usb.host
8384
8485
# (int) Target Android API, should be as high as possible.
85-
android.api = 33
86+
android.api = 35
8687
8788
# (int) Minimum API your APK / AAB will support.
88-
android.minapi = 21
89+
android.minapi = 28
8990
9091
# (int) Android NDK API to use. Should usually match android.minapi.
91-
android.ndk_api = 21
92+
android.ndk_api = 28
9293
9394
# (bool) Automatically accept SDK license agreements. Useful for CI.
9495
android.accept_sdk_license = True
@@ -103,16 +104,19 @@ android.accept_sdk_license = True
103104
# android.service_class_name = org.kivy.android.PythonService
104105
105106
# (list) The Android archs to build for
107+
# android.archs = arm64-v8a
106108
android.archs = arm64-v8a, armeabi-v7a
107109
108110
# (bool) enables Android auto backup feature (Android API >=23)
109111
android.allow_backup = True
110112
111113
# (str) The format used to package the app for release mode (aab or apk). aab is recommended for Play Store.
112114
android.release_artifact = apk
115+
android.release = false
113116
114117
# (str) The format used to package the app for debug mode (apk).
115-
# android.debug_artifact = apk
118+
android.debug_artifact = apk
119+
android.debug = true
116120
117121
#
118122
# Python for android (p4a) specific

requirements.android.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
python-escpos[image,qrcode,usb,serial]==3.1
22
python-socketio[client]==5.11.4
33
requests==2.32.3
4-
aiohttp==3.10.2
5-
argparse==1.4.0
6-
uuid==1.30
7-
appdirs==1.4.4
84
platformdirs==4.2.2
95
pika
10-
pywin32; sys_platform == 'win32'
11-
kivy[base]
6+
kivy[base]==2.3.1

requirements.cli.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ python-socketio[client]==5.11.4
33
requests==2.32.3
44
aiohttp==3.10.2
55
argparse==1.4.0
6-
uuid==1.30
76
appdirs==1.4.4
87
platformdirs==4.2.2
98
pika

requirements.kivy.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
python-escpos[all]==3.1
22
python-socketio[client]==5.11.4
33
requests==2.32.3
4-
aiohttp==3.10.2
5-
argparse==1.4.0
6-
uuid==1.30
7-
appdirs==1.4.4
84
platformdirs==4.2.2
95
pika
106
pywin32; sys_platform == 'win32'
11-
kivy[base]
7+
kivy[base]==2.3.1

0 commit comments

Comments
 (0)