Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: build/android/gyp/lint.py

Issue 1826563002: 🌓 Stop lint.py pulling in implicit dependencies via AndroidManifest.xml (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lint-cache-dir
Patch Set: fix new lint error in chrome/test/chromedriver/test/webview_shell Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/chromedriver/test/webview_shell/java/AndroidManifest.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/lint.py
diff --git a/build/android/gyp/lint.py b/build/android/gyp/lint.py
index 782f5deecdd3553530b6c1ca5d3e8dfeadcc989b..e60a2a6d0351d76e2d4147bb541c5252f3c78763 100755
--- a/build/android/gyp/lint.py
+++ b/build/android/gyp/lint.py
@@ -107,7 +107,6 @@ def _OnStaleMd5(changes, lint_path, config_path, processed_config_path,
new_dir = os.path.join(temp_dir, str(len(src_dirs)))
os.mkdir(new_dir)
src_dirs.append(new_dir)
- cmd.extend(['--sources', _RelativizePath(new_dir)])
return new_dir
def PathInDir(d, src):
@@ -121,10 +120,17 @@ def _OnStaleMd5(changes, lint_path, config_path, processed_config_path,
break
if not src_dir:
src_dir = NewSourceDir()
+ cmd.extend(['--sources', _RelativizePath(src_dir)])
os.symlink(os.path.abspath(src), PathInDir(src_dir, src))
+ # Put the manifest in a temporary directory in order to avoid lint detecting
+ # sibling res/ and src/ directories (which should be pass explicitly if they
+ # are to be included).
if manifest_path:
- cmd.append(_RelativizePath(os.path.join(manifest_path, os.pardir)))
+ src_dir = NewSourceDir()
+ os.symlink(os.path.abspath(manifest_path),
+ PathInDir(src_dir, manifest_path))
+ cmd.append(src_dir)
if os.path.exists(result_path):
os.remove(result_path)
« no previous file with comments | « no previous file | chrome/test/chromedriver/test/webview_shell/java/AndroidManifest.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698