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

Unified Diff: third_party/mojo/src/mojo/public/dart/rules.gni

Issue 1179733005: Update mojo sdk to rev bdbb0c7e396fc4044a8b194058d7a7e529715286 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update CommandBufferImpl (Binding::OnConnectionError is no more) Created 5 years, 6 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
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 03b17b18f958a04b9f75f61fcdabc89f334beb93..7786cd49f64dc478f3a1553b071dd521ba6afb95 100644
--- a/third_party/mojo/src/mojo/public/dart/rules.gni
+++ b/third_party/mojo/src/mojo/public/dart/rules.gni
@@ -215,6 +215,9 @@ template("dartzip_packaged_application") {
# sources
# List of sources to include in the package.
#
+# pkg_dir (optional)
+# Directory containing the package sources. This overrides sources.
+#
# deps (optional)
# Note: this can only contain mojom targets.
#
@@ -224,7 +227,11 @@ template("dartzip_packaged_application") {
# Directory containing sdk-ext .dart sources.
#
template("dart_pkg") {
- pubspec_yaml_path = rebase_path("pubspec.yaml")
+ if (defined(invoker.pkg_dir)) {
+ pubspec_yaml_path = rebase_path("pubspec.yaml", "", invoker.pkg_dir)
+ } else {
+ pubspec_yaml_path = rebase_path("pubspec.yaml")
+ }
dart_package_name_script =
rebase_path("mojo/public/tools/dart_package_name.py", ".", mojo_sdk_root)
package_name = exec_script(dart_package_name_script,
@@ -239,7 +246,7 @@ template("dart_pkg") {
package_root = rebase_path("$root_gen_dir/dart-pkg/packages")
stamp_file = "$root_gen_dir/dart-pkg/${package_name}.stamp"
- assert(defined(invoker.sources))
+ assert(defined(invoker.sources) || defined(invoker.pkg_dir))
action(target_name) {
deps = []
@@ -276,10 +283,23 @@ template("dart_pkg") {
stamp_file,
]
+ if (defined(invoker.sources)) {
+ sources = invoker.sources
+ } else {
+ assert(defined(invoker.pkg_dir))
+ list_script = rebase_path("build/ls.py", ".", mojo_sdk_root)
+ sources = exec_script(list_script,
+ [
+ "--target-directory",
+ rebase_path(invoker.pkg_dir),
+ ],
+ "list lines")
+ }
+
inputs = [
list_mojoms_script,
script,
- ] + rebase_path(invoker.sources)
+ ] + rebase_path(sources)
args = [
"--package-name",
@@ -293,7 +313,7 @@ template("dart_pkg") {
"--stamp-file",
rebase_path(stamp_file),
"--package-sources",
- ] + rebase_path(invoker.sources) + [ "--mojom-sources" ] +
+ ] + rebase_path(sources) + [ "--mojom-sources" ] +
rebase_path(mojom_sources, "", mojo_sdk_root) +
[ "--sdk-ext-directories" ] + rebase_path(sdk_ext_directory)
}

Powered by Google App Engine
This is Rietveld 408576698