Skip to content

Commit

Permalink
android: new numeric_version scheme; arm64 default
Browse files Browse the repository at this point in the history
  • Loading branch information
obfusk committed Aug 8, 2020
1 parent 289ecc2 commit 1851932
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
17 changes: 12 additions & 5 deletions android/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ ifndef APP_VERSION
$(error git describe failed)
endif

_arm64a := arm64-v8a
_arm64n := $(shell sed -n '/numeric_version/ s/.* 7/8/ p' buildozer.spec)
_arm64 := APP_ANDROID_ARCH=$(_arm64a) APP_ANDROID_NUMERIC_VERSION=$(_arm64n)
NUMERIC := $(shell python3 -c 'import sys,functools; print(10*functools.reduce(lambda x,y: x*100+int(y),([1]+sys.argv[1].replace("-",".").split(".")+[0])[:5],0))' $(APP_VERSION))
ifndef NUMERIC
$(error numeric version command failed)
endif

.PHONY: debug clean _dir

Expand All @@ -26,16 +27,22 @@ _dir:
.PHONY: release-armeabi-v7a release-arm64-v8a

debug-armeabi-v7a: _dir
APP_ANDROID_ARCH=armeabi-v7a \
APP_ANDROID_NUMERIC_VERSION=$$(( $(NUMERIC) + 1 )) \
buildozer android debug

debug-arm64-v8a: _dir
$(_arm64) buildozer android debug
APP_ANDROID_NUMERIC_VERSION=$$(( $(NUMERIC) + 2 )) \
buildozer android debug

release-armeabi-v7a: _dir
APP_ANDROID_ARCH=armeabi-v7a \
APP_ANDROID_NUMERIC_VERSION=$$(( $(NUMERIC) + 1 )) \
buildozer android release

release-arm64-v8a: _dir
$(_arm64) buildozer android release
APP_ANDROID_NUMERIC_VERSION=$$(( $(NUMERIC) + 2 )) \
buildozer android release

.PHONY: _setup_root _setup_user

Expand Down
7 changes: 3 additions & 4 deletions android/buildozer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ android.ndk = 20b
#android.ndk_path =
#android.sdk_path =
android.accept_sdk_license = True
android.arch = armeabi-v7a
android.arch = arm64-v8a
# !!! DON'T FORGET TO UPDATE THIS !!!
# arch (7 = armeabi-v7a, 8 = arm64-v8a) + minapi + version (%02d%02d%02d)
# e.g. armeabi-v7a + minapi 27 + v0.1.1 = 721000101
android.numeric_version = 721000200
# 0.2.0 -------------------vvvvvv
android.numeric_version = 1000200002
p4a.branch = develop
#p4a.source_dir =
p4a.local_recipes = ./p4a-recipes
Expand Down

0 comments on commit 1851932

Please sign in to comment.