|
1 | 1 | from os.path import (join, dirname, isdir, splitext, basename, realpath) |
2 | | -from os import listdir |
| 2 | +from os import listdir, mkdir |
3 | 3 | import sh |
4 | 4 | import glob |
5 | 5 | import json |
@@ -89,10 +89,14 @@ def prepare_build_dir(self): |
89 | 89 | self.build_dir = self.get_build_dir() |
90 | 90 | shprint(sh.cp, '-r', |
91 | 91 | join(self.bootstrap_dir, 'build'), |
92 | | - # join(self.ctx.root_dir, |
93 | | - # 'bootstrap_templates', |
94 | | - # self.name), |
95 | 92 | self.build_dir) |
| 93 | + if self.ctx.symlink_java_src: |
| 94 | + info('Symlinking java src instead of copying') |
| 95 | + shprint(sh.rm, '-r', join(self.build_dir, 'src')) |
| 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')) |
96 | 100 | with current_directory(self.build_dir): |
97 | 101 | with open('project.properties', 'w') as fileh: |
98 | 102 | fileh.write('target=android-{}'.format(self.ctx.android_api)) |
|
0 commit comments