[cronet] exclude pyc files from deps of generate_javadoc.py

This is to fix compile noop failure in internal builder.
http://shortn/_t5pHTnebHY

Merging this back without normal approval as it only affects Cronet and not Chrome.

Bug: 914264
Change-Id: I26881dca70d41fdb340df6d9ef85f1d9bd8b6a3b
Reviewed-on: https://chromium-review.googlesource.com/c/1448085
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Paul Jensen <pauljensen@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#628219}(cherry picked from commit 28d16f987cf5db3f673abe7b2f052252b1b08031)
Reviewed-on: https://chromium-review.googlesource.com/c/1449813
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Cr-Commit-Position: refs/branch-heads/3683@{#119}
Cr-Branched-From: e51029943e0a38dd794b73caaf6373d5496ae783-refs/heads/master@{#625896}
diff --git a/components/cronet/tools/generate_javadoc.py b/components/cronet/tools/generate_javadoc.py
index a76636c..062190d4 100755
--- a/components/cronet/tools/generate_javadoc.py
+++ b/components/cronet/tools/generate_javadoc.py
@@ -114,7 +114,9 @@
     assert options.zip_file
     deps = []
     for root, _, filenames in os.walk(options.input_dir):
-      deps.extend(os.path.join(root, f) for f in filenames)
+      # Ignore .pyc files here, it might be re-generated during build.
+      deps.extend(os.path.join(root, f) for f in filenames
+                  if not f.endswith('.pyc'))
     build_utils.WriteDepfile(options.depfile, options.zip_file, deps)
   # Clean up temporary output directory.
   build_utils.DeleteDirectory(unzipped_jar_path)