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

Side by Side Diff: mojo/public/dart/rules.gni

Issue 1824253002: Remove the mojom-sources flag from dart_pkg.py (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 | mojo/public/tools/dart_list_mojoms.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file has rules for making Dart packages and Dart-based Mojo applications. 5 # This file has rules for making Dart packages and Dart-based Mojo applications.
6 # The entrypoint is the dart_pkg rule. 6 # The entrypoint is the dart_pkg rule.
7 7
8 import("../mojo.gni") 8 import("../mojo.gni")
9 import("//build/module_args/mojo.gni") 9 import("//build/module_args/mojo.gni")
10 import("//build/module_args/dart.gni") 10 import("//build/module_args/dart.gni")
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 deps = [] 165 deps = []
166 if (defined(invoker.deps)) { 166 if (defined(invoker.deps)) {
167 deps += invoker.deps 167 deps += invoker.deps
168 } 168 }
169 169
170 datadeps = [] 170 datadeps = []
171 if (defined(invoker.datadeps)) { 171 if (defined(invoker.datadeps)) {
172 datadeps += invoker.datadeps 172 datadeps += invoker.datadeps
173 } 173 }
174 174
175 list_mojoms_script =
176 rebase_path("mojo/public/tools/dart_list_mojoms.py", ".", mojo_sdk_root)
177 mojom_sources = []
178 foreach(d, deps) {
179 root_prefix = rebase_path(".", "", mojo_sdk_root)
180 source_directory = rebase_path(get_label_info(d, "dir"))
181 mojom_sources += exec_script(list_mojoms_script,
182 [
183 source_directory,
184 root_prefix,
185 ],
186 "list lines")
187 }
188
189 sdk_ext_directory = [] 175 sdk_ext_directory = []
190 if (defined(invoker.sdk_ext_directory)) { 176 if (defined(invoker.sdk_ext_directory)) {
191 sdk_ext_directory += [ invoker.sdk_ext_directory ] 177 sdk_ext_directory += [ invoker.sdk_ext_directory ]
192 } 178 }
193 179
194 sdk_ext_files = [] 180 sdk_ext_files = []
195 if (defined(invoker.sdk_ext_files)) { 181 if (defined(invoker.sdk_ext_files)) {
196 sdk_ext_files += invoker.sdk_ext_files 182 sdk_ext_files += invoker.sdk_ext_files
197 } 183 }
198 184
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 217
232 # We have to use foreach to set up outputs instead of rebase_path because 218 # We have to use foreach to set up outputs instead of rebase_path because
233 # GN doesn't like assignments to outputs that aren't obviously under 219 # GN doesn't like assignments to outputs that aren't obviously under
234 # $root_gen_dir somewhere. 220 # $root_gen_dir somewhere.
235 outputs = [ 221 outputs = [
236 "$root_gen_dir/dart-pkg/${package_name}", 222 "$root_gen_dir/dart-pkg/${package_name}",
237 "$root_gen_dir/dart-pkg/packages/${package_name}", 223 "$root_gen_dir/dart-pkg/packages/${package_name}",
238 stamp_file, 224 stamp_file,
239 ] 225 ]
240 226
241 inputs = [ 227 inputs = [ script ] + rebase_path(sources)
242 list_mojoms_script,
243 script,
244 ] + rebase_path(sources)
245 228
246 args = [ 229 args = [
247 "--package-name", 230 "--package-name",
248 package_name, 231 package_name,
249 "--dart-sdk", 232 "--dart-sdk",
250 rebase_path(dart_sdk_root), 233 rebase_path(dart_sdk_root),
251 "--pkg-directory", 234 "--pkg-directory",
252 pkg_directory, 235 pkg_directory,
253 "--package-root", 236 "--package-root",
254 package_root, 237 package_root,
255 "--stamp-file", 238 "--stamp-file",
256 rebase_path(stamp_file), 239 rebase_path(stamp_file),
257 "--entries-file", 240 "--entries-file",
258 rebase_path(entries_file), 241 rebase_path(entries_file),
259 "--package-sources", 242 "--package-sources",
260 ] + rebase_path(sources) + [ "--package-entrypoints" ] + 243 ] + rebase_path(sources) + [ "--package-entrypoints" ] +
261 rebase_path(entrypoints) + [ "--mojom-sources" ] + 244 rebase_path(entrypoints) + [ "--sdk-ext-directories" ] +
262 rebase_path(mojom_sources, "", mojo_sdk_root) + 245 rebase_path(sdk_ext_directory) + [ "--sdk-ext-files" ] +
263 [ "--sdk-ext-directories" ] + rebase_path(sdk_ext_directory) + 246 rebase_path(sdk_ext_files) + [ "--sdk-ext-mappings" ] +
264 [ "--sdk-ext-files" ] + rebase_path(sdk_ext_files) + 247 sdk_ext_mappings + extra_flags
265 [ "--sdk-ext-mappings" ] + sdk_ext_mappings + extra_flags
266 } 248 }
267 } 249 }
268 250
269 # This is the entrypoint for organizing Dart code for Mojo. 251 # This is the entrypoint for organizing Dart code for Mojo.
270 # 252 #
271 # There should be a one to one mapping between dart_pkg rules and pubspec.yamls. 253 # There should be a one to one mapping between dart_pkg rules and pubspec.yamls.
272 # 254 #
273 # This build rule will result in a package under $root_gen_dir/dart-pkg/ 255 # This build rule will result in a package under $root_gen_dir/dart-pkg/
274 # 256 #
275 # The name of the package is taken from the 'pubspec.yaml' file. 257 # The name of the package is taken from the 'pubspec.yaml' file.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 group(target_name) { 431 group(target_name) {
450 deps = [] 432 deps = []
451 foreach(package_dir, packages) { 433 foreach(package_dir, packages) {
452 deps += [ ":$package_dir" ] 434 deps += [ ":$package_dir" ]
453 } 435 }
454 if (defined(invoker.deps)) { 436 if (defined(invoker.deps)) {
455 deps += invoker.deps 437 deps += invoker.deps
456 } 438 }
457 } 439 }
458 } 440 }
OLDNEW
« no previous file with comments | « no previous file | mojo/public/tools/dart_list_mojoms.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698