generate_gradle.py: Add --extra-target that appends to the default set
I find this is more often what I want (as opposed to replacing the default list of targets). BUG=620034 Review-Url: https://codereview.chromium.org/2784293002 Cr-Original-Commit-Position: refs/heads/master@{#460878} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: f8d338ac684358b34a2cd77518d434fb6fa433a3
This commit is contained in:
Родитель
0ad304ccdc
Коммит
30113aa452
|
@ -633,8 +633,13 @@ def main():
|
|||
parser.add_argument('--target',
|
||||
dest='targets',
|
||||
action='append',
|
||||
help='GN target to generate project for. '
|
||||
'May be repeated.')
|
||||
help='GN target to generate project for. Replaces set of '
|
||||
'default targets. May be repeated.')
|
||||
parser.add_argument('--extra-target',
|
||||
dest='extra_targets',
|
||||
action='append',
|
||||
help='GN target to generate project for, in addition to '
|
||||
'the default ones. May be repeated.')
|
||||
parser.add_argument('--project-dir',
|
||||
help='Root of the output project.',
|
||||
default=os.path.join('$CHROMIUM_OUTPUT_DIR', 'gradle'))
|
||||
|
@ -676,6 +681,8 @@ def main():
|
|||
targets = _QueryForAllGnTargets(output_dir)
|
||||
else:
|
||||
targets = args.targets or _DEFAULT_TARGETS
|
||||
if args.extra_targets:
|
||||
targets.extend(args.extra_targets)
|
||||
targets = [re.sub(r'_test_apk$', '_test_apk__apk', t) for t in targets]
|
||||
# TODO(wnwen): Utilize Gradle's test constructs for our junit tests?
|
||||
targets = [re.sub(r'_junit_tests$', '_junit_tests__java_binary', t)
|
||||
|
|
Загрузка…
Ссылка в новой задаче