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

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

Issue 1233493008: Generate Sky's _sdkext file using the build system (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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_pkg.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 # Rules to generate zipped applications for Dart. 5 # Rules to generate zipped applications for Dart.
6 # Rules to generate dart-pkg and dart-pkg/packages. 6 # Rules to generate dart-pkg and dart-pkg/packages.
7 7
8 import("//build/module_args/mojo.gni") 8 import("//build/module_args/mojo.gni")
9 9
10 template("dartzip_package") { 10 template("dartzip_package") {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 # Note: this can only contain mojom targets. 220 # Note: this can only contain mojom targets.
221 # 221 #
222 # datadeps (optional) 222 # datadeps (optional)
223 # 223 #
224 # sdk_ext_directory (optional) 224 # sdk_ext_directory (optional)
225 # Directory containing sdk-ext .dart sources. 225 # Directory containing sdk-ext .dart sources.
226 # 226 #
227 # sdk_ext_files (optional) 227 # sdk_ext_files (optional)
228 # List of sources to include in sdk-ext. 228 # List of sources to include in sdk-ext.
229 # 229 #
230 # sdk_ext_mappings (optional)
231 # Mappings for dart libraries that are part of of sdk_ext.
232 #
230 template("dart_pkg") { 233 template("dart_pkg") {
231 if (defined(invoker.pkg_dir)) { 234 if (defined(invoker.pkg_dir)) {
232 pubspec_yaml_path = rebase_path("pubspec.yaml", "", invoker.pkg_dir) 235 pubspec_yaml_path = rebase_path("pubspec.yaml", "", invoker.pkg_dir)
233 } else { 236 } else {
234 pubspec_yaml_path = rebase_path("pubspec.yaml") 237 pubspec_yaml_path = rebase_path("pubspec.yaml")
235 } 238 }
236 dart_package_name_script = 239 dart_package_name_script =
237 rebase_path("mojo/public/tools/dart_package_name.py", ".", mojo_sdk_root) 240 rebase_path("mojo/public/tools/dart_package_name.py", ".", mojo_sdk_root)
238 package_name = exec_script(dart_package_name_script, 241 package_name = exec_script(dart_package_name_script,
239 [ 242 [
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 sdk_ext_directory = [] 280 sdk_ext_directory = []
278 if (defined(invoker.sdk_ext_directory)) { 281 if (defined(invoker.sdk_ext_directory)) {
279 sdk_ext_directory += [ invoker.sdk_ext_directory ] 282 sdk_ext_directory += [ invoker.sdk_ext_directory ]
280 } 283 }
281 284
282 sdk_ext_files = [] 285 sdk_ext_files = []
283 if (defined(invoker.sdk_ext_files)) { 286 if (defined(invoker.sdk_ext_files)) {
284 sdk_ext_files += invoker.sdk_ext_files 287 sdk_ext_files += invoker.sdk_ext_files
285 } 288 }
286 289
290 sdk_ext_mappings = []
291 if (defined(invoker.sdk_ext_mappings)) {
292 sdk_ext_mappings += invoker.sdk_ext_mappings
293 }
294
287 script = rebase_path("mojo/public/tools/dart_pkg.py", ".", mojo_sdk_root) 295 script = rebase_path("mojo/public/tools/dart_pkg.py", ".", mojo_sdk_root)
288 outputs = [ 296 outputs = [
289 stamp_file, 297 stamp_file,
290 ] 298 ]
291 299
292 if (defined(invoker.sources)) { 300 if (defined(invoker.sources)) {
293 sources = invoker.sources 301 sources = invoker.sources
294 } else { 302 } else {
295 assert(defined(invoker.pkg_dir)) 303 assert(defined(invoker.pkg_dir))
296 list_script = rebase_path("build/ls.py", ".", mojo_sdk_root) 304 list_script = rebase_path("build/ls.py", ".", mojo_sdk_root)
(...skipping 18 matching lines...) Expand all
315 "--pkg-directory", 323 "--pkg-directory",
316 pkg_directory, 324 pkg_directory,
317 "--package-root", 325 "--package-root",
318 package_root, 326 package_root,
319 "--stamp-file", 327 "--stamp-file",
320 rebase_path(stamp_file), 328 rebase_path(stamp_file),
321 "--package-sources", 329 "--package-sources",
322 ] + rebase_path(sources) + [ "--mojom-sources" ] + 330 ] + rebase_path(sources) + [ "--mojom-sources" ] +
323 rebase_path(mojom_sources, "", mojo_sdk_root) + 331 rebase_path(mojom_sources, "", mojo_sdk_root) +
324 [ "--sdk-ext-directories" ] + rebase_path(sdk_ext_directory) + 332 [ "--sdk-ext-directories" ] + rebase_path(sdk_ext_directory) +
325 [ "--sdk-ext-files" ] + rebase_path(sdk_ext_files) 333 [ "--sdk-ext-files" ] + rebase_path(sdk_ext_files) +
334 [ "--sdk-ext-mappings" ] + sdk_ext_mappings
326 } 335 }
327 } 336 }
OLDNEW
« no previous file with comments | « no previous file | mojo/public/tools/dart_pkg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698