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

Side by Side Diff: build/android/gyp/javac.py

Issue 1397423005: GN: Fix enable_incremental_javac never recompiling changes to .srcjars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import optparse 7 import optparse
8 import os 8 import os
9 import shutil 9 import shutil
10 import re 10 import re
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 pdb_path = options.jar_path + '.pdb' 202 pdb_path = options.jar_path + '.pdb'
203 javac_cmd = _ConvertToJMakeArgs(javac_cmd, pdb_path) 203 javac_cmd = _ConvertToJMakeArgs(javac_cmd, pdb_path)
204 if srcjars: 204 if srcjars:
205 _FixTempPathsInIncrementalMetadata(pdb_path, temp_dir) 205 _FixTempPathsInIncrementalMetadata(pdb_path, temp_dir)
206 206
207 if srcjars: 207 if srcjars:
208 java_dir = os.path.join(temp_dir, 'java') 208 java_dir = os.path.join(temp_dir, 'java')
209 os.makedirs(java_dir) 209 os.makedirs(java_dir)
210 for srcjar in options.java_srcjars: 210 for srcjar in options.java_srcjars:
211 if changed_paths: 211 if changed_paths:
212 changed_paths.update(changes.IterChangedSubpaths(srcjar)) 212 changed_paths.update(os.path.join(java_dir, f)
213 for f in changes.IterChangedSubpaths(srcjar))
213 build_utils.ExtractAll(srcjar, path=java_dir, pattern='*.java') 214 build_utils.ExtractAll(srcjar, path=java_dir, pattern='*.java')
214 jar_srcs = build_utils.FindInDirectory(java_dir, '*.java') 215 jar_srcs = build_utils.FindInDirectory(java_dir, '*.java')
215 jar_srcs = _FilterJavaFiles(jar_srcs, options.javac_includes) 216 jar_srcs = _FilterJavaFiles(jar_srcs, options.javac_includes)
216 java_files.extend(jar_srcs) 217 java_files.extend(jar_srcs)
217 if changed_paths: 218 if changed_paths:
218 # Set the mtime of all sources to 0 since we use the absense of .class 219 # Set the mtime of all sources to 0 since we use the absense of .class
219 # files to tell jmake which files are stale. 220 # files to tell jmake which files are stale.
220 for path in jar_srcs: 221 for path in jar_srcs:
221 os.utime(path, (0, 0)) 222 os.utime(path, (0, 0))
222 223
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 options, 438 options,
438 input_paths=input_paths, 439 input_paths=input_paths,
439 input_strings=javac_cmd, 440 input_strings=javac_cmd,
440 output_paths=output_paths, 441 output_paths=output_paths,
441 force=force, 442 force=force,
442 pass_changes=True) 443 pass_changes=True)
443 444
444 445
445 if __name__ == '__main__': 446 if __name__ == '__main__':
446 sys.exit(main(sys.argv[1:])) 447 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698