-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename final apk with arch in the name #967
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good overall, but we could achieve the same with less code.
Also I always wish we take the opportunity to increase our test coverage 😉
buildozer/targets/android.py
Outdated
@@ -1144,6 +1146,11 @@ def build_package(self): | |||
apk_dir = join(dist_dir, "bin") | |||
apk_dest = apk | |||
|
|||
packagename = config.get('app', 'package.name') | |||
apk_dest = u'{packagename}-{version}-{arch}-{mode}.apk'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That line apk_dest = apk
above should then be removed, since we override it and don't use it anymore
buildozer/targets/android.py
Outdated
apk_dest = u'{packagename}-{version}-{mode}.apk'.format( | ||
packagename=packagename, mode=mode, version=version) | ||
|
||
apk_dest = u'{packagename}-{version}-{arch}-{mode}.apk'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could move it outside the if/else and have that part made only once since we're doing exactly the same inside and outside the if/else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
buildozer/targets/android.py
Outdated
@@ -1142,7 +1139,11 @@ def build_package(self): | |||
version=version, | |||
mode=mode) | |||
apk_dir = join(dist_dir, "bin") | |||
apk_dest = apk | |||
packagename = config.get('app', 'package.name') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theoretically this guy could also get out the if/else 😬 since we have it in both here and line 1126.
So I would suggest to remove it from both and put it just before the if is_gradle_build:
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
less is more, thanks 👍
If i do 2 build with the same buildozer spec, but 2 profiles with different arch (or 2 buildozer spec), i don't want the final apk to be overwritten. So now the final apk name contains the arch:
For example:
connectage-0.4.0.23-arm64-v8a-release.apk
connectage-0.4.0.23-armeabi-v7a-release.apk