[android] Move CIPD dependencies into DEPS. (RELAND)
Bug: 755920 Change-Id: Idb7367fcd6e425d3a2a2e5c05599abc3fa5954ef Reviewed-on: https://chromium-review.googlesource.com/930178 Reviewed-by: David Trainor <dtrainor@chromium.org> Reviewed-by: Shenghua Zhang <shenghuazhang@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Commit-Queue: John Budorick <jbudorick@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#545646} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: e9aa27c9fc24d8c49a7fc780de7899b725f44984
This commit is contained in:
Родитель
c1eaca3570
Коммит
91e01b1b7a
|
@ -1 +0,0 @@
|
|||
*
|
|
@ -1,137 +0,0 @@
|
|||
# Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Dependencies for Android target OS.
|
||||
|
||||
# -crX indicates the chromium-specific revision of a package at a given version.
|
||||
|
||||
@Subdir third_party/accessibility_test_framework
|
||||
chromium/third_party/accessibility-test-framework version:2.1-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/android_support_test_runner
|
||||
chromium/third_party/android_support_test_runner version:0.5-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/android_system_sdk
|
||||
chromium/third_party/android_system_sdk version:27-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/apk-patch-size-estimator
|
||||
chromium/third_party/apk-patch-size-estimator version:0.2-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/bazel
|
||||
chromium/third_party/bazel version:0.10.0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/bouncycastle
|
||||
chromium/third_party/bouncycastle version:1.46-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/byte_buddy
|
||||
chromium/third_party/byte_buddy version:1.4.17-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/espresso
|
||||
chromium/third_party/espresso version:2.2.1-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/gson
|
||||
chromium/third_party/gson version:2.8.0-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/guava
|
||||
chromium/third_party/guava version:23.0-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/hamcrest
|
||||
chromium/third_party/hamcrest version:1.3-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/icu4j
|
||||
chromium/third_party/icu4j version:53.1-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/intellij
|
||||
chromium/third_party/intellij version:12.0-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/javax_inject
|
||||
chromium/third_party/javax_inject version:1-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/objenesis
|
||||
chromium/third_party/objenesis version:2.4-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/ow2_asm
|
||||
chromium/third_party/ow2_asm version:5.0.1-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/robolectric
|
||||
chromium/third_party/robolectric version:3.5.1
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/sqlite4java
|
||||
chromium/third_party/sqlite4java version:0.282-cr0
|
||||
|
||||
# Three unchanging lines
|
||||
# avoid the horror that is
|
||||
# endless merge conflicts
|
||||
|
||||
@Subdir third_party/xstream
|
||||
chromium/third_party/xstream version:1.4.8-cr0
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
"""Updates dependencies managed by CIPD."""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
_SRC_ROOT = os.path.realpath(
|
||||
os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
|
||||
|
||||
def cipd_ensure(root, service_url, ensure_file):
|
||||
|
||||
def is_windows():
|
||||
return sys.platform in ('cygwin', 'win32')
|
||||
|
||||
cipd_binary = 'cipd'
|
||||
if is_windows():
|
||||
cipd_binary = 'cipd.bat'
|
||||
|
||||
with tempfile.NamedTemporaryFile() as tmp_stdouterr:
|
||||
retcode = subprocess.call(
|
||||
[cipd_binary, 'ensure',
|
||||
'-ensure-file', ensure_file,
|
||||
'-root', root,
|
||||
'-service-url', service_url],
|
||||
shell=is_windows(),
|
||||
stderr=subprocess.STDOUT,
|
||||
stdout=tmp_stdouterr)
|
||||
if retcode:
|
||||
tmp_stdouterr.seek(0)
|
||||
for line in tmp_stdouterr:
|
||||
print line,
|
||||
return retcode
|
||||
|
||||
|
||||
def build_ensure_file(sub_files):
|
||||
pieces = []
|
||||
for sub in sub_files:
|
||||
pieces.append('### Sourced from //%s' % os.path.relpath(sub, _SRC_ROOT))
|
||||
with open(sub) as f:
|
||||
pieces.append(f.read())
|
||||
return '\n'.join(pieces)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Updates CIPD-managed dependencies based on the given OS.')
|
||||
|
||||
parser.add_argument(
|
||||
'--keep-generated-file',
|
||||
action='store_true',
|
||||
help='Don\'t delete the generated ensure file, if any, on success.')
|
||||
parser.add_argument(
|
||||
'--chromium-root',
|
||||
required=True,
|
||||
help='Root directory for dependency.')
|
||||
parser.add_argument(
|
||||
'--service-url',
|
||||
help='The url of the CIPD service.',
|
||||
default='https://chrome-infra-packages.appspot.com')
|
||||
parser.add_argument(
|
||||
'--ensure-file',
|
||||
action='append',
|
||||
type=os.path.realpath,
|
||||
required=True,
|
||||
help='The path to the ensure file. If given multiple times, this will '
|
||||
'concatenate the given ensure files before passing them to cipd.')
|
||||
args = parser.parse_args()
|
||||
|
||||
build_own_ensure_file = len(args.ensure_file) > 1
|
||||
if build_own_ensure_file:
|
||||
ensure_file_contents = build_ensure_file(args.ensure_file)
|
||||
with tempfile.NamedTemporaryFile(suffix='.ensure') as ensure_file:
|
||||
ensure_file.write(ensure_file_contents)
|
||||
ensure_file_name = ensure_file.name
|
||||
ensure_file.delete = False
|
||||
else:
|
||||
ensure_file_name = args.ensure_file[0]
|
||||
|
||||
retcode = cipd_ensure(args.chromium_root, args.service_url, ensure_file_name)
|
||||
if retcode:
|
||||
if build_own_ensure_file:
|
||||
print 'Ensure failed; generated input file is at', ensure_file_name
|
||||
return retcode
|
||||
|
||||
if build_own_ensure_file:
|
||||
if args.keep_generated_file:
|
||||
print 'Leaving the generated .ensure file at', ensure_file_name
|
||||
else:
|
||||
os.unlink(ensure_file_name)
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
Загрузка…
Ссылка в новой задаче