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

Unified Diff: mojo/public/tools/bindings/generators/mojom_dart_generator.py

Issue 1449203002: Check in generated Dart bindings and add presubmit script (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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: mojo/public/tools/bindings/generators/mojom_dart_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_dart_generator.py b/mojo/public/tools/bindings/generators/mojom_dart_generator.py
index e5f86e1818c48ad242f0aae59344be905cc8feb3..bf2237a41d773476a32600102ba8d2340eb38cc9 100644
--- a/mojo/public/tools/bindings/generators/mojom_dart_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_dart_generator.py
@@ -446,10 +446,22 @@ class Generator(generator.Generator):
elements = self.module.namespace.split('.')
elements.append("%s.dart" % self.module.name)
- package_name = GetPackage(self.module)
lib_module = self.GenerateLibModule(args)
- pkg_path = os.path.join("dart-pkg", package_name, "lib", *elements)
- self.Write(lib_module, pkg_path)
+
+ # List of packages with checked in bindings.
+ # TODO(johnmccutchan): Stop generating bindings as part of build system
+ # and then remove this.
+ packages_with_checked_in_bindings = [
+ 'mojo',
+ 'mojo_apptest',
+ 'mojo_services',
+ 'mojo_sdk'
+ 'mojom'
+ ]
+ package_name = GetPackage(self.module)
+ if not (package_name in packages_with_checked_in_bindings):
+ pkg_path = os.path.join("dart-pkg", package_name, "lib", *elements)
+ self.Write(lib_module, pkg_path)
gen_path = os.path.join("dart-gen", package_name, "lib", *elements)
full_gen_path = os.path.join(self.output_dir, gen_path)
« no previous file with comments | « mojo/dart/tools/presubmit/check_mojom_dart.py ('k') | mojo/public/tools/bindings/mojom_list_dart_outputs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698