Index: third_party/mojo/src/mojo/public/dart/rules.gni |
diff --git a/third_party/mojo/src/mojo/public/dart/rules.gni b/third_party/mojo/src/mojo/public/dart/rules.gni |
index 36fc92d15e0763d9742e82aca8afa337ccfa7619..d4adbb1ef6dc39f08eaaf3940dd0c7b1a28a16b0 100644 |
--- a/third_party/mojo/src/mojo/public/dart/rules.gni |
+++ b/third_party/mojo/src/mojo/public/dart/rules.gni |
@@ -116,8 +116,6 @@ template("dartzip_package") { |
rebase_path(package_output), |
rebase_path("$target_gen_dir/${package_target_name}_analyze.stamp"), |
"--no-hints", |
- "--url-mapping=dart:io,/" + |
- rebase_path("mojo/public/dart/lib/io.dart", "/", mojo_sdk_root), |
] |
deps = [ |
@@ -226,6 +224,12 @@ template("dartzip_packaged_application") { |
# sdk_ext_directory (optional) |
# Directory containing sdk-ext .dart sources. |
# |
+# sdk_ext_files (optional) |
+# List of sources to include in sdk-ext. |
+# |
+# sdk_ext_mappings (optional) |
+# Mappings for dart libraries that are part of of sdk_ext. |
+# |
template("dart_pkg") { |
if (defined(invoker.pkg_dir)) { |
pubspec_yaml_path = rebase_path("pubspec.yaml", "", invoker.pkg_dir) |
@@ -245,6 +249,7 @@ template("dart_pkg") { |
pkg_directory = rebase_path("$root_gen_dir/dart-pkg") |
package_root = rebase_path("$root_gen_dir/dart-pkg/packages") |
stamp_file = "$root_gen_dir/dart-pkg/${package_name}.stamp" |
+ output_dir = "$root_gen_dir/dart-pkg/${package_name}" |
assert(defined(invoker.sources) || defined(invoker.pkg_dir)) |
@@ -278,8 +283,19 @@ template("dart_pkg") { |
sdk_ext_directory += [ invoker.sdk_ext_directory ] |
} |
+ sdk_ext_files = [] |
+ if (defined(invoker.sdk_ext_files)) { |
+ sdk_ext_files += invoker.sdk_ext_files |
+ } |
+ |
+ sdk_ext_mappings = [] |
+ if (defined(invoker.sdk_ext_mappings)) { |
+ sdk_ext_mappings += invoker.sdk_ext_mappings |
+ } |
+ |
script = rebase_path("mojo/public/tools/dart_pkg.py", ".", mojo_sdk_root) |
outputs = [ |
+ output_dir, |
stamp_file, |
] |
@@ -315,6 +331,8 @@ template("dart_pkg") { |
"--package-sources", |
] + rebase_path(sources) + [ "--mojom-sources" ] + |
rebase_path(mojom_sources, "", mojo_sdk_root) + |
- [ "--sdk-ext-directories" ] + rebase_path(sdk_ext_directory) |
+ [ "--sdk-ext-directories" ] + rebase_path(sdk_ext_directory) + |
+ [ "--sdk-ext-files" ] + rebase_path(sdk_ext_files) + |
+ [ "--sdk-ext-mappings" ] + sdk_ext_mappings |
} |
} |