OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Generates an Android Studio project from a GN target.""" | 6 """Generates an Android Studio project from a GN target.""" |
7 | 7 |
8 import argparse | 8 import argparse |
9 import codecs | 9 import codecs |
10 import logging | 10 import logging |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 entry.android_test_entry = android_test_entries[target_name] | 481 entry.android_test_entry = android_test_entries[target_name] |
482 del android_test_entries[target_name] | 482 del android_test_entries[target_name] |
483 # Add unmatched test entries as individual targets. | 483 # Add unmatched test entries as individual targets. |
484 combined_entries.extend(android_test_entries.values()) | 484 combined_entries.extend(android_test_entries.values()) |
485 return combined_entries | 485 return combined_entries |
486 | 486 |
487 | 487 |
488 def main(): | 488 def main(): |
489 parser = argparse.ArgumentParser() | 489 parser = argparse.ArgumentParser() |
490 parser.add_argument('--output-directory', | 490 parser.add_argument('--output-directory', |
491 default='out/Debug', | |
492 help='Path to the root build directory.') | 491 help='Path to the root build directory.') |
493 parser.add_argument('-v', | 492 parser.add_argument('-v', |
494 '--verbose', | 493 '--verbose', |
495 dest='verbose_count', | 494 dest='verbose_count', |
496 default=0, | 495 default=0, |
497 action='count', | 496 action='count', |
498 help='Verbose level') | 497 help='Verbose level') |
499 parser.add_argument('--target', | 498 parser.add_argument('--target', |
500 dest='targets', | 499 dest='targets', |
501 action='append', | 500 action='append', |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 _ExtractSrcjars(generator.project_dir, srcjar_tuples) | 590 _ExtractSrcjars(generator.project_dir, srcjar_tuples) |
592 | 591 |
593 logging.warning('Project created! (%d subprojects)', len(project_entries)) | 592 logging.warning('Project created! (%d subprojects)', len(project_entries)) |
594 logging.warning('Generated projects work best with Android Studio 2.2') | 593 logging.warning('Generated projects work best with Android Studio 2.2') |
595 logging.warning('For more tips: https://chromium.googlesource.com/chromium' | 594 logging.warning('For more tips: https://chromium.googlesource.com/chromium' |
596 '/src.git/+/master/docs/android_studio.md') | 595 '/src.git/+/master/docs/android_studio.md') |
597 | 596 |
598 | 597 |
599 if __name__ == '__main__': | 598 if __name__ == '__main__': |
600 main() | 599 main() |
OLD | NEW |