Skip to content

Commit 759c622

Browse files
committed
Android build fixes
- updates requirements as per Play Store - can build aab on release
1 parent d6823a6 commit 759c622

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

.buildbot/android/build.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@
22
export LC_ALL=en_US.UTF-8
33
export LANG=en_US.UTF-8
44
pushd packages/android
5-
buildozer android debug || exit $?
5+
6+
BUILDMODE=debug
7+
8+
if [ "$BUILDBOT_JOBNAME" = "android" -a \
9+
"$BUILDBOT_REPOSITORY" = "https://github.com/Bitmessage/PyBitmessage" -a \
10+
"$BUILDBOT_BRANCH" = "v0.6" ]; then
11+
sed -e 's/android.release_artifact *=.*/release_artifact = aab/' -i "" buildozer.spec
12+
BUILDMODE=release
13+
fi
14+
15+
buildozer android $BUILDMODE || exit $?
616
popd
717

818
mkdir -p ../out
9-
cp packages/android/bin/*.apk ../out
19+
RELEASE_ARTIFACT=$(grep release_artifact packages/android/buildozer.spec |cut -d= -f2|tr -Cd 'a-z')
20+
cp packages/android/bin/*.${RELEASE_ARTIFACT} ../out

.buildbot/android/test.sh

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash
22

3+
RELEASE_ARTIFACT=$(grep release_artifact packages/android/buildozer.spec |cut -d= -f2|tr -Cd 'a-z')
4+
5+
if [ $RELEASE_ARTIFACT = "aab" ]; then
6+
exit
7+
fi
8+
39
unzip -p packages/android/bin/*.apk assets/private.tar \
410
| tar --list -z > package.list
511
cat package.list

packages/android/buildozer.spec

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[app]
22

33
# (str) Title of your application
4-
title = mockone
4+
title = PyBitmessage Mock
55

66
# (str) Package name
7-
package.name = mock
7+
package.name = pybitmessagemock
88

99
# (str) Package domain (needed for android/ios packaging)
10-
package.domain = org.mock
10+
package.domain = at.bitmessage
1111

1212
# (str) Source code where the main.py live
1313
source.dir = ../../src
@@ -28,7 +28,7 @@ source.include_exts = py,png,jpg,kv,atlas,tflite,sql
2828
#source.exclude_patterns = license,images/*/*.jpg
2929

3030
# (str) Application versioning (method 1)
31-
version = 0.1
31+
version = 0.1.1
3232

3333
# (str) Application versioning (method 2)
3434
# version.regex = __version__ = ['"](.*)['"]
@@ -92,7 +92,7 @@ fullscreen = 0
9292

9393
# (int) Android API to use (targetSdkVersion AND compileSdkVersion)
9494
# note: when changing, Dockerfile also needs to be changed to install corresponding build tools
95-
android.api = 28
95+
android.api = 33
9696

9797
# (int) Minimum API required. You will need to set the android.ndk_api to be as low as this value.
9898
android.minapi = 21
@@ -243,6 +243,8 @@ android.allow_backup = True
243243
# Usage example : android.manifest_placeholders = [myCustomUrl:\"org.kivy.customurl\"]
244244
# android.manifest_placeholders = [:]
245245

246+
android.release_artifact = apk
247+
246248
#
247249
# Python for android (p4a) specific
248250
#

0 commit comments

Comments
 (0)