Skip to content

Commit 3d54a35

Browse files
committed
Fix versioning
1 parent cad31be commit 3d54a35

File tree

1 file changed

+7
-4
lines changed
  • pythonforandroid/bootstraps/common/build

1 file changed

+7
-4
lines changed

pythonforandroid/bootstraps/common/build/build.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,17 @@ def make_package(args):
408408

409409
version_code = 0
410410
if not args.numeric_version:
411-
# Set version code in format (arch-minsdk-app_version)
412-
arch_dict = {"x86_64": "9", "arm64-v8a": "8", "armeabi-v7a": "7", "x86": "6"}
413-
arch_code = arch_dict.get(arch, '1')
411+
"""
412+
Set version code in format (10 + minsdk + app_version)
413+
Historically versioning was (arch + minsdk + app_version),
414+
with arch expressed with a single digit from 6 to 9.
415+
Since the multi-arch support, has been changed to 10.
416+
"""
414417
min_sdk = args.min_sdk_version
415418
for i in args.version.split('.'):
416419
version_code *= 100
417420
version_code += int(i)
418-
args.numeric_version = "{}{}{}".format(arch_code, min_sdk, version_code)
421+
args.numeric_version = "{}{}{}".format("10", min_sdk, version_code)
419422

420423
if args.intent_filters:
421424
with open(args.intent_filters) as fd:

0 commit comments

Comments
 (0)