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

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

Issue 953953003: Introduce dartanalyze into our build. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: mojob integration Created 5 years, 10 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
« no previous file with comments | « README.md ('k') | mojo/public/dart/src/codec.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/dart/rules.gni
diff --git a/mojo/public/dart/rules.gni b/mojo/public/dart/rules.gni
index 5845f2e5c096746439eb1bb3c36b67866374f7aa..31cfd2717cb7a88624e03b07aeaaf42857bacf18 100644
--- a/mojo/public/dart/rules.gni
+++ b/mojo/public/dart/rules.gni
@@ -54,6 +54,7 @@ template("dart_package") {
# dart_package targets.
template("dart_packaged_application") {
package_name = "${target_name}_package"
+ package_analyze_sources = "${target_name}_analyze"
package_output = "$target_out_dir/$package_name.dartzip"
if (defined(invoker.output_name)) {
@@ -62,6 +63,39 @@ template("dart_packaged_application") {
mojo_output = "$root_out_dir/" + target_name + ".mojo"
}
+ action_foreach(package_analyze_sources) {
+ sources = invoker.sources
+
+ script = rebase_path("mojo/public/tools/dart_analyze.py", ".", mojo_root)
+
+ args = [
+ rebase_path(root_gen_dir),
+ rebase_path("$target_gen_dir/{{source_name_part}}.stamp"),
+ "{{source}}",
+ "--no-hints",
+ "--url-mapping=mojo:application,/" +
+ rebase_path("mojo/public/dart/application.dart", "/", mojo_root),
+ "--url-mapping=mojo:bindings,/" +
+ rebase_path("mojo/public/dart/bindings.dart", "/", mojo_root),
+ "--url-mapping=mojo:builtin,/" +
+ rebase_path("mojo/dart/embedder/builtin.dart", "/", mojo_root),
+ "--url-mapping=mojo:core,/" +
+ rebase_path("mojo/public/dart/core.dart", "/", mojo_root),
+ ]
+
+ if (defined(invoker.deps)) {
+ deps = invoker.deps
+ }
+
+ if (defined(invoker.datadeps)) {
+ datadeps = invoker.datadeps
+ }
+
+ outputs = [
+ "$target_gen_dir/{{source_name_part}}.stamp",
+ ]
+ }
+
dart_package(package_name) {
sources = invoker.sources
if (defined(invoker.deps)) {
@@ -89,6 +123,9 @@ template("dart_packaged_application") {
]
deps = [
+ # TODO(erg): When dartanalyze runs at an acceptable speed, add
+ # ":$package_analyze_sources" as a dependency here and remove the
+ # manual group("check") in the toplevel build file.
":$package_name",
]
if (defined(invoker.deps)) {
« no previous file with comments | « README.md ('k') | mojo/public/dart/src/codec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698