Skip to content

Commit 05f7fa0

Browse files
committed
Fixed java src copying
Now only copies original java src folders (so newly created ones in the build process don't matter)
1 parent df4f65f commit 05f7fa0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pythonforandroid/bootstrap.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from os.path import (join, dirname, isdir, splitext, basename, realpath)
2-
from os import listdir
2+
from os import listdir, mkdir
33
import sh
44
import glob
55
import json
@@ -93,7 +93,10 @@ def prepare_build_dir(self):
9393
if self.ctx.symlink_java_src:
9494
info('Symlinking java src instead of copying')
9595
shprint(sh.rm, '-r', join(self.build_dir, 'src'))
96-
shprint(sh.ln, '-s', join(self.bootstrap_dir, 'build', 'src'), self.build_dir)
96+
shprint(sh.mkdir, join(self.build_dir, 'src'))
97+
for dirn in listdir(join(self.bootstrap_dir, 'build', 'src')):
98+
shprint(sh.ln, '-s', join(self.bootstrap_dir, 'build', 'src', dirn),
99+
join(self.build_dir, 'src'))
97100
with current_directory(self.build_dir):
98101
with open('project.properties', 'w') as fileh:
99102
fileh.write('target=android-{}'.format(self.ctx.android_api))

0 commit comments

Comments
 (0)