Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
merge_deps_sources Namespace Reference

Functions

 main ()
 

Detailed Description

Merges sources of a Dart target and its dependencies

Function Documentation

◆ main()

merge_deps_sources.main ( )

Definition at line 15 of file merge_deps_sources.py.

15def main():
16 parser = argparse.ArgumentParser(
17 'Merges sources of a Dart target and its dependencies', fromfile_prefix_chars='@'
18 )
19 parser.add_argument(
20 '--output', help='Path to output the final list', type=argparse.FileType('w'), required=True
21 )
22 parser.add_argument(
23 '--depfile',
24 help='Path to the depfile to generate',
25 type=argparse.FileType('w'),
26 required=True
27 )
28 parser.add_argument(
29 '--sources',
30 help='Sources of this target',
31 nargs='*',
32 )
33 parser.add_argument('--source_lists', help='Files containing lists of Dart sources', nargs='*')
34 args = parser.parse_args()
35
36 args.depfile.write('{}: {}\n'.format(args.output.name, ' '.join(args.source_lists)))
37
38 # Merges sources of this target, and all of its dependencies.
39 all_sources = set(args.sources)
40 for f in args.source_lists:
41 with open(f, 'r') as f:
42 all_sources.update(json.load(f))
43 json.dump(sorted(all_sources), args.output)
44
45
uint32_t uint32_t * format
Definition main.py:1