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

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

Issue 1681223007: Android Add java_group() template to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maintain ordering Created 4 years, 10 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 | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/write_build_config.py
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py
index e86f8c09bdef2bca051c4fc31479d2a068e6b8c7..9e209f72f507618f23817e7d00dfcfbb07d61845 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -93,12 +93,23 @@ def GetAllDepsConfigsInOrder(deps_config_paths):
return build_utils.GetSortedTransitiveDependencies(deps_config_paths, GetDeps)
+def ResolveGroups(configs):
+ while True:
+ groups = DepsOfType('group', configs)
+ if not groups:
+ return configs
+ for config in groups:
+ index = configs.index(config)
+ expanded_configs = [GetDepConfig(p) for p in config['deps_configs']]
+ configs[index:index + 1] = expanded_configs
+
+
class Deps(object):
def __init__(self, direct_deps_config_paths):
self.all_deps_config_paths = GetAllDepsConfigsInOrder(
direct_deps_config_paths)
- self.direct_deps_configs = [
- GetDepConfig(p) for p in direct_deps_config_paths]
+ self.direct_deps_configs = ResolveGroups(
+ [GetDepConfig(p) for p in direct_deps_config_paths])
self.all_deps_configs = [
GetDepConfig(p) for p in self.all_deps_config_paths]
self.direct_deps_config_paths = direct_deps_config_paths
@@ -244,7 +255,8 @@ def main(argv):
'android_resources': ['build_config', 'resources_zip'],
'android_apk': ['build_config', 'jar_path', 'dex_path', 'resources_zip'],
'deps_dex': ['build_config', 'dex_path'],
- 'resource_rewriter': ['build_config']
+ 'resource_rewriter': ['build_config'],
+ 'group': ['build_config'],
}
required_options = required_options_map.get(options.type)
if not required_options:
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698