Get travis green, test on oldest supported SDK... (#200)

Enable dartfmt again on travis – and formatted code
Bump min SDK to 2.1.0
Run travis only on master branch
Cache .pub-cache
diff --git a/.travis.yml b/.travis.yml
index 103a8a0..c7cf7e8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,15 @@
 language: dart
-sudo: false
+
 dart:
+  - 2.1.0
   - dev
+
 script: ./tool/travis.sh
+
+# Only building master means that we don't run two builds for each pull request.
+branches:
+  only: [master]
+
+cache:
+  directories:
+  - $HOME/.pub-cache
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 3ab0961..d6ba42b 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,4 +1,4 @@
 analyzer:
-  strong-mode:
-    implicit-dynamic: False
-    implicit-casts: False
\ No newline at end of file
+#  strong-mode:
+#    implicit-dynamic: False
+#    implicit-casts: False
diff --git a/changelog.md b/changelog.md
index bb57307..9c5739e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,6 @@
-# Changelog - vector_math
+## 2.0.9
+
+- Update Dart SDK constraint to `>=2.1.0 <3.0.0`.
 
 ## v 2.0.8 - July 2018
 
diff --git a/pubspec.yaml b/pubspec.yaml
index cfaf2e5..e247d64 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,12 +1,13 @@
 name: vector_math
-version: 2.0.8
+version: 2.0.9-dev
 author: John McCutchan <john@johnmccutchan.com>
 description: A Vector Math library for 2D and 3D applications.
 homepage: https://github.com/google/vector_math.dart
+
 environment:
-  sdk: '>=2.0.0-dev.49.0 <3.0.0'
+  sdk: '>=2.1.0 <3.0.0'
+
 dev_dependencies:
   benchmark_harness: any
-  browser: any
-  path: '>=1.0.0 <2.0.0'
-  test: '>=0.12.0 <0.13.0'
+  path: ^1.0.0
+  test: ^1.6.0
diff --git a/test/aabb3_test.dart b/test/aabb3_test.dart
index 90317a2..0f4efde 100644
--- a/test/aabb3_test.dart
+++ b/test/aabb3_test.dart
@@ -16,8 +16,7 @@
   final buffer =
       new Float32List.fromList([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0]).buffer;
   final aabb = new Aabb3.fromBuffer(buffer, 0);
-  final aabbOffest =
-      new Aabb3.fromBuffer(buffer, Float32List.bytesPerElement);
+  final aabbOffest = new Aabb3.fromBuffer(buffer, Float32List.bytesPerElement);
 
   expect(aabb.min.x, equals(1.0));
   expect(aabb.min.y, equals(2.0));
diff --git a/test/colors_test.dart b/test/colors_test.dart
index 69fcbfd..e1f92f4 100644
--- a/test/colors_test.dart
+++ b/test/colors_test.dart
@@ -79,7 +79,6 @@
 
   expect(Colors.toHexString(color, alpha: true), equals('88ff00ff'));
 
-
   Colors.fromHexString('#8F0f', color);
 
   relativeTest(color.r, 1.0);
@@ -126,7 +125,7 @@
   expect(Colors.toHexString(color, alpha: true), equals('00000000'));
 
   expect(() => Colors.fromHexString('vector_math rules!', color),
-      throwsA(new isInstanceOf<FormatException>()));
+      throwsA(isA<FormatException>()));
 }
 
 void testFromRgba() {
diff --git a/test/geometry_test.dart b/test/geometry_test.dart
index 368ee3a..efd1749 100644
--- a/test/geometry_test.dart
+++ b/test/geometry_test.dart
@@ -126,13 +126,13 @@
   // Combining two meshes should generate indices that are not out of range.
   SphereGenerator sphereGenerator = new SphereGenerator();
 
-  MeshGeometry sphere0 = sphereGenerator.createSphere(10.0,
-      latSegments: 8, lonSegments: 8);
-  MeshGeometry sphere1 = sphereGenerator.createSphere(10.0,
-      latSegments: 8, lonSegments: 8);
+  MeshGeometry sphere0 =
+      sphereGenerator.createSphere(10.0, latSegments: 8, lonSegments: 8);
+  MeshGeometry sphere1 =
+      sphereGenerator.createSphere(10.0, latSegments: 8, lonSegments: 8);
 
   MeshGeometry combined = new MeshGeometry.combine([sphere0, sphere1]);
-  expect(combined.indices, everyElement(lessThan(combined.length)));  
+  expect(combined.indices, everyElement(lessThan(combined.length)));
 }
 
 void main() {
diff --git a/test/matrix3_test.dart b/test/matrix3_test.dart
index 9308e70..5c550c0 100644
--- a/test/matrix3_test.dart
+++ b/test/matrix3_test.dart
@@ -21,7 +21,7 @@
           0.757200229110721   0.567821640725221   0.530797553008973
           0.753729094278495   0.075854289563064   0.779167230102011'''));
   expectedOutput.add(parseMatrix<Matrix3>(
-       ''' 0.402164743710542  -0.292338588868304   0.171305679728352
+      ''' 0.402164743710542  -0.292338588868304   0.171305679728352
           -0.189908046274114   0.182052622470548  -0.110871609529434
           -0.370546805539367   0.265070987960728  -0.125768101844091'''));
   input.add(parseMatrix<Matrix3>('''1     0     0
diff --git a/tool/travis.sh b/tool/travis.sh
index e63eb0f..bda4668 100755
--- a/tool/travis.sh
+++ b/tool/travis.sh
@@ -3,14 +3,15 @@
 # Fast fail the script on failures.
 set -e
 
-# Skipping format check for now – until 1.12 is stable
-# $(dirname -- "$0")/ensure_dartfmt.sh
+if [ "$TRAVIS_DART_VERSION" = "dev" ]; then
+  dartfmt -n --set-exit-if-changed .
+fi
 
 # Run the tests.
-dart --checked test/test_all.dart
+pub run test
 
 # Install dart_coveralls; gather and send coverage data.
-if [ "$COVERALLS_TOKEN" ] && [ "$TRAVIS_DART_VERSION" = "stable" ]; then
+if [ "$COVERALLS_TOKEN" ] && [ "$TRAVIS_DART_VERSION" = "dev" ]; then
   pub global activate dart_coveralls
   pub global run dart_coveralls report \
     --token $COVERALLS_TOKEN \