whitelist: always generate the whitelist even after the initial distribution build. Otherwise, any further changes are not reflected in the final app.
This commit is contained in:
parent
4b12f34d06
commit
b17a0ef6c1
1 changed files with 10 additions and 7 deletions
|
@ -448,13 +448,6 @@ class TargetAndroid(Target):
|
|||
if not exists(dist_dir):
|
||||
need_compile = 1
|
||||
|
||||
# whitelist p4a
|
||||
p4a_whitelist = self.buildozer.config.getlist('app', 'android.p4a_whitelist')
|
||||
if p4a_whitelist:
|
||||
with open(join(self.pa_dir, 'src', 'whitelist.txt'), 'w') as fd:
|
||||
for wl in p4a_whitelist:
|
||||
fd.write(wl + '\n')
|
||||
|
||||
if not need_compile:
|
||||
self.buildozer.info('Distribution already compiled, pass.')
|
||||
return
|
||||
|
@ -484,6 +477,13 @@ class TargetAndroid(Target):
|
|||
package = package_domain + '.' + package
|
||||
return package.lower()
|
||||
|
||||
def _generate_whitelist(self, dist_dir):
|
||||
p4a_whitelist = self.buildozer.config.getlist('app', 'android.p4a_whitelist')
|
||||
whitelist_fn = join(dist_dir, 'whitelist.txt')
|
||||
with open(whitelist_fn, 'w') as fd:
|
||||
for wl in p4a_whitelist:
|
||||
fd.write(wl + '\n')
|
||||
|
||||
def build_package(self):
|
||||
dist_name = self.buildozer.config.get('app', 'package.name')
|
||||
dist_dir = join(self.pa_dir, 'dist', dist_name)
|
||||
|
@ -515,6 +515,9 @@ class TargetAndroid(Target):
|
|||
# add src files
|
||||
self._add_java_src(dist_dir)
|
||||
|
||||
# generate the whitelist if needed
|
||||
self._generate_whitelist(dist_dir)
|
||||
|
||||
# build the app
|
||||
build_cmd = (
|
||||
'{python} build.py --name {name}'
|
||||
|
|
Loading…
Reference in a new issue