| Index: build/android/gyp/main_dex_list.py
|
| diff --git a/build/android/gyp/main_dex_list.py b/build/android/gyp/main_dex_list.py
|
| index e18422e958aeff7b2d1ac2b3f04e9ea9e89ed46b..9a9448c3fc1fca893e70b9db1911dcbac69b8f89 100755
|
| --- a/build/android/gyp/main_dex_list.py
|
| +++ b/build/android/gyp/main_dex_list.py
|
| @@ -29,6 +29,8 @@ def main(args):
|
| 'main dex.')
|
| parser.add_argument('--main-dex-list-path', required=True,
|
| help='The main dex list file to generate.')
|
| + parser.add_argument('--main-dex-list-path-java', required=True,
|
| + help='The main dex list file to generate.')
|
| parser.add_argument('--enabled-configurations',
|
| help='The build configurations for which a main dex list'
|
| ' should be generated.')
|
| @@ -100,7 +102,7 @@ def main(args):
|
|
|
| build_utils.CallAndWriteDepfileIfStale(
|
| lambda: _OnStaleMd5(proguard_cmd, main_dex_list_cmd, args.paths,
|
| - args.main_dex_list_path),
|
| + args.main_dex_list_path, args.main_dex_list_path_java),
|
| args,
|
| input_paths=input_paths,
|
| input_strings=input_strings,
|
| @@ -109,7 +111,7 @@ def main(args):
|
| return 0
|
|
|
|
|
| -def _OnStaleMd5(proguard_cmd, main_dex_list_cmd, paths, main_dex_list_path):
|
| +def _OnStaleMd5(proguard_cmd, main_dex_list_cmd, paths, main_dex_list_path, main_dex_list_path_java):
|
| paths_arg = ':'.join(paths)
|
| main_dex_list = ''
|
| try:
|
| @@ -132,9 +134,20 @@ def _OnStaleMd5(proguard_cmd, main_dex_list_cmd, paths, main_dex_list_path):
|
| else:
|
| raise
|
|
|
| + tmp = []
|
| + for line in main_dex_list.split('\n'):
|
| + if 'FileDescriptorInfo' not in line:
|
| + tmp.append(line)
|
| + main_dex_list = '\n'.join(l for l in tmp)
|
| +
|
| with open(main_dex_list_path, 'w') as main_dex_list_file:
|
| main_dex_list_file.write(main_dex_list)
|
|
|
| + if main_dex_list_path_java:
|
| + with open(main_dex_list_path_java, 'w') as main_dex_list_file:
|
| + main_dex_list_file.write(
|
| + ','.join([c.replace('/', '.').split('.class')[0]
|
| + for c in main_dex_list.split('\n')]))
|
|
|
| if __name__ == '__main__':
|
| sys.exit(main(sys.argv[1:]))
|
|
|