Commit 0fd5121f authored by mef's avatar mef Committed by Commit Bot

[Cronet] Use gn desc to find third party licenses on Android.

Filter out build/secondary/third_party dependencies to work around
__main__.LicenseError: missing README.chromium or licenses.py SPECIAL_CASES entry in build/secondary/third_party/android_tools

BUG=606859
BUG=710801
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2959303002
Cr-Commit-Position: refs/heads/master@{#485291}
parent b891953a
...@@ -1201,13 +1201,17 @@ jar_src("jar_cronet_impl_native_java_source") { ...@@ -1201,13 +1201,17 @@ jar_src("jar_cronet_impl_native_java_source") {
action("generate_licenses") { action("generate_licenses") {
_license_path = "$_package_dir/LICENSE" _license_path = "$_package_dir/LICENSE"
script = "//components/cronet/tools/cronet_licenses.py" script = "//tools/licenses.py"
outputs = [ outputs = [
_license_path, _license_path,
] ]
args = [ args = [
"license", "license_file",
rebase_path(_license_path, root_build_dir), rebase_path(_license_path, root_build_dir),
"--gn-target",
"//components/cronet/android:cronet",
"--gn-out-dir",
".",
] ]
} }
......
...@@ -493,7 +493,7 @@ def GetThirdPartyDepsFromGNDepsOutput(gn_deps): ...@@ -493,7 +493,7 @@ def GetThirdPartyDepsFromGNDepsOutput(gn_deps):
third_party_deps = set() third_party_deps = set()
for build_dep in gn_deps.split(): for build_dep in gn_deps.split():
m = re.search(r'^(.+/third_party/[^/]+)/(.+/)?BUILD\.gn$', build_dep) m = re.search(r'^(.+/third_party/[^/]+)/(.+/)?BUILD\.gn$', build_dep)
if m: if m and not os.path.join('build', 'secondary') in build_dep:
third_party_deps.add(m.group(1)) third_party_deps.add(m.group(1))
return third_party_deps return third_party_deps
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment