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

Unified Diff: components/cronet/tools/jar_src.py

Issue 1553623003: Port cronet_package GYP target to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix issues Created 5 years 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 | « components/cronet/tools/generate_javadoc.py ('k') | url/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/tools/jar_src.py
diff --git a/components/cronet/tools/jar_src.py b/components/cronet/tools/jar_src.py
index 0cda4a894d8b8f25ebceb36cff9412cf589ad710..2b941d59e9837809989929ab90ac2340d6c5df22 100755
--- a/components/cronet/tools/jar_src.py
+++ b/components/cronet/tools/jar_src.py
@@ -32,6 +32,7 @@ def JarSources(src_dir, jar_path):
def main():
parser = optparse.OptionParser()
+ build_utils.AddDepfileOption(parser)
parser.add_option('--src-dir', action="append",
help='Directory containing .java files.')
parser.add_option('--jar-path', help='Jar output path.')
@@ -39,13 +40,24 @@ def main():
options, _ = parser.parse_args()
+ src_dirs = []
for src_dir in options.src_dir:
+ src_dirs.extend(build_utils.ParseGypList(src_dir))
+
+ for src_dir in src_dirs:
JarSources(src_dir, options.jar_path)
+ if options.depfile:
+ input_paths = []
+ for src_dir in src_dirs:
+ for root, _, filenames in os.walk(src_dir):
+ input_paths.extend(os.path.join(root, f) for f in filenames)
+ build_utils.WriteDepfile(options.depfile,
+ input_paths + build_utils.GetPythonDependencies())
+
if options.stamp:
build_utils.Touch(options.stamp)
-
if __name__ == '__main__':
sys.exit(main())
« no previous file with comments | « components/cronet/tools/generate_javadoc.py ('k') | url/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698