mojo/syncbase: Changing the build targets so we always
check Dart dependencies and upgrade them to the latest.
Since we use relaxed "any" versioning for Dart dependencies,
we can all be on different versions until we all do a "veryclean"
and reinstall. This causes issues, for example dartftm uses
Dart_Style dependency and us being on different
versions can cause conflicting dartfmt edits.
With this CL, we always get and upgrade dart dependencues on test,
analyzer and fmt targets.
Change-Id: I1fc4bba9aea858734e3c02db2b9fc59f725c3f6c
diff --git a/Makefile b/Makefile
index 4f810d6..70f7feb 100644
--- a/Makefile
+++ b/Makefile
@@ -91,7 +91,7 @@
# Formats dart files to follow dart style conventions.
.PHONY: dartfmt
-dartfmt:
+dartfmt: dart/packages
dartfmt --overwrite $(DART_FILES)
# Lints src and test files with dartanalyzer. This takes a few seconds.
@@ -104,12 +104,14 @@
cd sky_demo && dartanalyzer lib/*.dart | grep -v "\.mojom\.dart, line"
# Installs dart dependencies.
-dart/packages: dart/pubspec.yaml
- cd dart && pub get
+.PHONY: dart/packages
+dart/packages:
+ cd dart && pub upgrade
# Installs dart dependencies.
-sky_demo/packages: sky_demo/pubspec.yaml
- cd sky_demo && pub get
+.PHONY: sky_demo/packages
+sky_demo/packages:
+ cd sky_demo && pub upgrade
.PHONY: run-syncbase-example
run-syncbase-example: $(ETHER_BUILD_DIR)/syncbase_server.mojo dart/packages dart/lib/gen/dart-gen/mojom/lib/mojo/syncbase.mojom.dart | syncbase-env-check
@@ -128,7 +130,7 @@
.PHONY: test-unit
test-unit: dart/packages
- cd dart && pub run test test/unit
+ cd dart && pub run test test/unit/*.dart
.PHONY: test-integration
test-integration: dart/packages $(ETHER_BUILD_DIR)/syncbase_server.mojo gen-mojom | syncbase-env-check