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

Side by Side Diff: build/android/gradle/generate_gradle.py

Issue 2747723002: Fix .so-file enumeration in generate_gradle.py. (Closed)
Patch Set: Created 3 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 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 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Generates an Android Studio project from a GN target.""" 6 """Generates an Android Studio project from a GN target."""
7 7
8 import argparse 8 import argparse
9 import codecs 9 import codecs
10 import glob 10 import glob
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 jinja_processor, split_projects): 242 jinja_processor, split_projects):
243 self.project_dir = project_dir 243 self.project_dir = project_dir
244 self.build_vars = build_vars 244 self.build_vars = build_vars
245 self.use_gradle_process_resources = use_gradle_process_resources 245 self.use_gradle_process_resources = use_gradle_process_resources
246 self.jinja_processor = jinja_processor 246 self.jinja_processor = jinja_processor
247 self.split_projects = split_projects 247 self.split_projects = split_projects
248 248
249 def _GenJniLibs(self, root_entry): 249 def _GenJniLibs(self, root_entry):
250 libraries = [] 250 libraries = []
251 for entry in self._GetEntries(root_entry): 251 for entry in self._GetEntries(root_entry):
252 libraries += entry.BuildConfig().get('native', []) 252 libraries += entry.BuildConfig().get('native', {}).get('libraries', [])
253 if libraries: 253 if libraries:
254 return _CreateJniLibsDir(constants.GetOutDirectory(), 254 return _CreateJniLibsDir(constants.GetOutDirectory(),
255 self.EntryOutputDir(root_entry), libraries) 255 self.EntryOutputDir(root_entry), libraries)
256 return [] 256 return []
257 257
258 def _GenJavaDirs(self, root_entry): 258 def _GenJavaDirs(self, root_entry):
259 java_files = [] 259 java_files = []
260 for entry in self._GetEntries(root_entry): 260 for entry in self._GetEntries(root_entry):
261 java_files += entry.JavaFiles() 261 java_files += entry.JavaFiles()
262 java_dirs, excludes = _ComputeJavaSourceDirsAndExcludes( 262 java_dirs, excludes = _ComputeJavaSourceDirsAndExcludes(
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 _ExtractZips(generator.project_dir, zip_tuples) 737 _ExtractZips(generator.project_dir, zip_tuples)
738 738
739 logging.warning('Project created! (%d subprojects)', len(project_entries)) 739 logging.warning('Project created! (%d subprojects)', len(project_entries))
740 logging.warning('Generated projects work best with Android Studio 2.2') 740 logging.warning('Generated projects work best with Android Studio 2.2')
741 logging.warning('For more tips: https://chromium.googlesource.com/chromium' 741 logging.warning('For more tips: https://chromium.googlesource.com/chromium'
742 '/src.git/+/master/docs/android_studio.md') 742 '/src.git/+/master/docs/android_studio.md')
743 743
744 744
745 if __name__ == '__main__': 745 if __name__ == '__main__':
746 main() 746 main()
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