use correct extension for final binary

This commit is contained in:
Akinwale Ariwodola 2021-08-21 20:03:07 +01:00
parent 3178799798
commit 42673b7e6d

View file

@ -1280,10 +1280,10 @@ class TargetAndroid(Target):
(exists(join(dist_dir, x)) for x in gradle_files)) (exists(join(dist_dir, x)) for x in gradle_files))
packagename = config.get('app', 'package.name') packagename = config.get('app', 'package.name')
pkgsuffix = 'aar' if packagetype == 'library' else 'apk'
if is_gradle_build: if is_gradle_build:
# on gradle build, the apk use the package name, and have no version # on gradle build, the apk use the package name, and have no version
packagename = config.get('app', 'package.name') packagename = config.get('app', 'package.name')
pkgsuffix = 'aar' if packagetype == 'library' else 'apk'
apk = u'{packagename}-{mode}.{extension}'.format( apk = u'{packagename}-{mode}.{extension}'.format(
packagename=packagename, mode=mode, extension=pkgsuffix) packagename=packagename, mode=mode, extension=pkgsuffix)
apk_dir = join(dist_dir, "build", "outputs", pkgsuffix, apk_dir = join(dist_dir, "build", "outputs", pkgsuffix,
@ -1303,8 +1303,8 @@ class TargetAndroid(Target):
mode=mode) mode=mode)
apk_dir = join(dist_dir, "bin") apk_dir = join(dist_dir, "bin")
apk_dest = u'{packagename}-{version}-{arch}-{mode}.apk'.format( apk_dest = u'{packagename}-{version}-{arch}-{mode}.{extension}'.format(
packagename=packagename, mode=mode, version=version, packagename=packagename, mode=mode, version=version, extension=pkgsuffix,
arch=self._arch) arch=self._arch)
# copy to our place # copy to our place