Add support for conditions on DEPS file.

See https://chromium-review.googlesource.com/687499 for the corresponding Chromium change.

Bug: None
Change-Id: I23330d161dc60fd4c8681e58ce5a8e20a2b4a3b8
Reviewed-on: https://webrtc-review.googlesource.com/4540
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20032}
This commit is contained in:
Edward Lemur
2017-09-28 19:09:17 +02:00
committed by Commit Bot
parent 3db4762327
commit bbceb76f54
2 changed files with 47 additions and 27 deletions

68
DEPS
View File

@ -88,30 +88,52 @@ deps = {
} }
deps_os = { deps_os = {
'android': { 'android': {
'src/third_party/android_tools': 'src/third_party/android_tools': {
Var('chromium_git') + '/android_tools.git' + '@' + 'ca9dc7245b888c75307f0619e4a39fb46a82de66', 'url': Var('chromium_git') + '/android_tools.git' + '@' + 'ca9dc7245b888c75307f0619e4a39fb46a82de66',
'src/third_party/ced/src': 'condition': 'checkout_android',
Var('chromium_git') + '/external/github.com/google/compact_enc_det.git' + '@' + '94c367a1fe3a13207f4b22604fcfd1d9f9ddf6d9', },
'src/third_party/icu': 'src/third_party/ced/src': {
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '08cb956852a5ccdba7f9c941728bb833529ba3c6', 'url': Var('chromium_git') + '/external/github.com/google/compact_enc_det.git' + '@' + '94c367a1fe3a13207f4b22604fcfd1d9f9ddf6d9',
'src/third_party/jsr-305/src': 'condition': 'checkout_android',
Var('chromium_git') + '/external/jsr-305.git' + '@' + '642c508235471f7220af6d5df2d3210e3bfc0919', },
'src/third_party/junit/src': 'src/third_party/icu': {
Var('chromium_git') + '/external/junit.git' + '@' + '64155f8a9babcfcf4263cf4d08253a1556e75481', 'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '08cb956852a5ccdba7f9c941728bb833529ba3c6',
'src/third_party/lss': 'condition': 'checkout_android',
Var('chromium_git') + '/linux-syscall-support.git' + '@' + Var('lss_revision'), },
'src/third_party/mockito/src': 'src/third_party/jsr-305/src': {
Var('chromium_git') + '/external/mockito/mockito.git' + '@' + 'de83ad4598ad4cf5ea53c69a8a8053780b04b850', 'url': Var('chromium_git') + '/external/jsr-305.git' + '@' + '642c508235471f7220af6d5df2d3210e3bfc0919',
'src/third_party/requests/src': 'condition': 'checkout_android',
Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'f172b30356d821d180fa4ecfa3e71c7274a32de4', },
'src/third_party/robolectric/robolectric': 'src/third_party/junit/src': {
Var('chromium_git') + '/external/robolectric.git' + '@' + 'b02c65cc6d7465f58f0de48a39914aa905692afa', 'url': Var('chromium_git') + '/external/junit.git' + '@' + '64155f8a9babcfcf4263cf4d08253a1556e75481',
'src/third_party/ub-uiautomator/lib': 'condition': 'checkout_android',
Var('chromium_git') + '/chromium/third_party/ub-uiautomator.git' + '@' + '00270549ce3161ae72ceb24712618ea28b4f9434', },
'src/third_party/lss': {
'url': Var('chromium_git') + '/linux-syscall-support.git' + '@' + Var('lss_revision'),
'condition': 'checkout_android',
},
'src/third_party/mockito/src': {
'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + 'de83ad4598ad4cf5ea53c69a8a8053780b04b850',
'condition': 'checkout_android',
},
'src/third_party/requests/src': {
'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'f172b30356d821d180fa4ecfa3e71c7274a32de4',
'condition': 'checkout_android',
},
'src/third_party/robolectric/robolectric': {
'url': Var('chromium_git') + '/external/robolectric.git' + '@' + 'b02c65cc6d7465f58f0de48a39914aa905692afa',
'condition': 'checkout_android',
},
'src/third_party/ub-uiautomator/lib': {
'url': Var('chromium_git') + '/chromium/third_party/ub-uiautomator.git' + '@' + '00270549ce3161ae72ceb24712618ea28b4f9434',
'condition': 'checkout_android',
},
# Gradle 3.5.0. Used for testing Android Studio project generation for WebRTC. # Gradle 3.5.0. Used for testing Android Studio project generation for WebRTC.
'src/examples/androidtests/third_party/gradle': 'src/examples/androidtests/third_party/gradle': {
Var('chromium_git') + '/external/github.com/gradle/gradle.git' + '@' + 'url': Var('chromium_git') + '/external/github.com/gradle/gradle.git' + '@' +
'941559e020f6c357ebb08d5c67acdb858a3defc2', '941559e020f6c357ebb08d5c67acdb858a3defc2',
'condition': 'checkout_android',
},
}, },
'ios': { 'ios': {
'src/ios': 'src/ios':

View File

@ -210,10 +210,8 @@ def BuildDepsentryDict(deps_dict):
def AddDepsEntries(deps_subdict): def AddDepsEntries(deps_subdict):
for path, deps_url in deps_subdict.iteritems(): for path, deps_url in deps_subdict.iteritems():
if isinstance(deps_url, dict): if isinstance(deps_url, dict):
# We don't support deps conditional on a variable. deps_url = deps_url['url']
# This is needed after http://crrev.com/9f8b8eb2 if not result.has_key(path):
continue
elif not result.has_key(path):
url, revision = deps_url.split('@') if deps_url else (None, None) url, revision = deps_url.split('@') if deps_url else (None, None)
result[path] = DepsEntry(path, url, revision) result[path] = DepsEntry(path, url, revision)