Refactor apk_dest code to prevent code duplication.
This commit is contained in:
parent
581a1ba2da
commit
c92b3ef925
1 changed files with 4 additions and 10 deletions
|
@ -1127,11 +1127,6 @@ class TargetAndroid(Target):
|
||||||
apk = u'{packagename}-{mode}.apk'.format(
|
apk = u'{packagename}-{mode}.apk'.format(
|
||||||
packagename=packagename, mode=mode)
|
packagename=packagename, mode=mode)
|
||||||
apk_dir = join(dist_dir, "build", "outputs", "apk", mode_sign)
|
apk_dir = join(dist_dir, "build", "outputs", "apk", mode_sign)
|
||||||
|
|
||||||
apk_dest = u'{packagename}-{version}-{arch}-{mode}.apk'.format(
|
|
||||||
packagename=packagename, mode=mode, version=version,
|
|
||||||
arch=self._arch)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# on ant, the apk use the title, and have version
|
# on ant, the apk use the title, and have version
|
||||||
bl = u'\'" ,'
|
bl = u'\'" ,'
|
||||||
|
@ -1144,12 +1139,11 @@ class TargetAndroid(Target):
|
||||||
version=version,
|
version=version,
|
||||||
mode=mode)
|
mode=mode)
|
||||||
apk_dir = join(dist_dir, "bin")
|
apk_dir = join(dist_dir, "bin")
|
||||||
apk_dest = apk
|
|
||||||
|
|
||||||
packagename = config.get('app', 'package.name')
|
packagename = config.get('app', 'package.name')
|
||||||
apk_dest = u'{packagename}-{version}-{arch}-{mode}.apk'.format(
|
|
||||||
packagename=packagename, mode=mode, version=version,
|
apk_dest = u'{packagename}-{version}-{arch}-{mode}.apk'.format(
|
||||||
arch=self._arch)
|
packagename=packagename, mode=mode, version=version,
|
||||||
|
arch=self._arch)
|
||||||
|
|
||||||
# copy to our place
|
# copy to our place
|
||||||
copyfile(join(apk_dir, apk), join(self.buildozer.bin_dir, apk_dest))
|
copyfile(join(apk_dir, apk), join(self.buildozer.bin_dir, apk_dest))
|
||||||
|
|
Loading…
Reference in a new issue