Remove transformer and barback dependency (#823)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 62eda07..1da95ec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+## 0.12.37
+
+* Removed the transformer, and the `pub_serve.dart` entrypoint. This is not
+  being treated as a breaking change because the minimum sdk constraint now
+  points to an sdk which does not support pub serve or barback any more anyways.
+* Drop the dependency on `barback`.
+
 ## 0.12.36
 
 * Expose the test bootstrapping methods, so that build systems can precompile
diff --git a/README.md b/README.md
index 7b7c9ef..4a94bbd 100644
--- a/README.md
+++ b/README.md
@@ -792,6 +792,16 @@
 
 ## Support for Other Packages
 
+### `build_runner`
+
+If you are using `package:build_runner` to build your package, then you will
+need a dependency on `build_test` in your `dev_dependencies`, and then you can
+use the `pub run build_runner test` command to run tests.
+
+To supply arguments to `package:test`, you need to separate them from your build
+args with a `--` argument. For example, running all web tests in release mode
+would look like this `pub run build_runner test --release -- -p vm`.
+
 ### `term_glyph`
 
 The [`term_glyph`][term_glyph] package provides getters for Unicode glyphs with
@@ -802,58 +812,6 @@
 
 [term_glyph]: https://pub.dartlang.org/packages/term_glyph
 
-### `barback`
-
-Packages using the `barback` transformer system may need to test code that's
-created or modified using transformers. The test runner handles this using the
-`--pub-serve` option, which tells it to load the test code from a `pub serve`
-instance rather than from the filesystem.
-
-Before using the `--pub-serve` option, add the `test/pub_serve` transformer to
-your `pubspec.yaml`. This transformer adds the necessary bootstrapping code that
-allows the test runner to load your tests properly:
-
-```yaml
-transformers:
-- test/pub_serve:
-    $include: test/**_test{.*,}.dart
-```
-
-Note that if you're using the test runner along with [`polymer`][polymer], you
-have to make sure that the `test/pub_serve` transformer comes *after* the
-`polymer` transformer:
-
-[polymer]: https://www.dartlang.org/polymer/
-
-```yaml
-transformers:
-- polymer
-- test/pub_serve:
-    $include: test/**_test{.*,}.dart
-```
-
-Then, start up `pub serve`. Make sure to pay attention to which port it's using
-to serve your `test/` directory:
-
-```shell
-$ pub serve
-Loading source assets...
-Loading test/pub_serve transformers...
-Serving my_app web on http://localhost:8080
-Serving my_app test on http://localhost:8081
-Build completed successfully
-```
-
-In this case, the port is `8081`. In another terminal, pass this port to
-`--pub-serve` and otherwise invoke `pub run test` as normal:
-
-```shell
-$ pub run test --pub-serve=8081 -p chrome
-"pub serve" is compiling test/my_app_test.dart...
-"pub serve" is compiling test/utils_test.dart...
-00:00 +42: All tests passed!
-```
-
 ## Further Reading
 
 Check out the [API docs][api] for detailed information about all the functions
diff --git a/lib/pub_serve.dart b/lib/pub_serve.dart
deleted file mode 100644
index 10815f6..0000000
--- a/lib/pub_serve.dart
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:convert';
-
-import 'package:barback/barback.dart';
-import 'package:path/path.dart' as p;
-
-/// A transformer that injects bootstrapping code used by the test runner to run
-/// tests against a "pub serve" instance.
-///
-/// This doesn't modify existing code at all, it just adds wrapper files that
-/// can be used to load isolates or iframes.
-class PubServeTransformer extends Transformer implements DeclaringTransformer {
-  final allowedExtensions = ".dart";
-
-  PubServeTransformer.asPlugin();
-
-  void declareOutputs(DeclaringTransform transform) {
-    var id = transform.primaryId;
-    transform.declareOutput(id.addExtension('.vm_test.dart'));
-    transform.declareOutput(id.addExtension('.browser_test.dart'));
-    transform.declareOutput(id.addExtension('.node_test.dart'));
-  }
-
-  Future apply(Transform transform) async {
-    var id = transform.primaryInput.id;
-
-    transform
-        .addOutput(new Asset.fromString(id.addExtension('.vm_test.dart'), '''
-          import "dart:isolate";
-
-          import "package:test/src/bootstrap/vm.dart";
-
-          import "${p.url.basename(id.path)}" as test;
-
-          void main(_, SendPort message) {
-            internalBootstrapVmTest(() => test.main, message);
-          }
-        '''));
-
-    transform.addOutput(
-        new Asset.fromString(id.addExtension('.browser_test.dart'), '''
-          import "package:test/src/bootstrap/browser.dart";
-
-          import "${p.url.basename(id.path)}" as test;
-
-          void main() {
-            internalBootstrapBrowserTest(() => test.main);
-          }
-        '''));
-
-    transform
-        .addOutput(new Asset.fromString(id.addExtension('.node_test.dart'), '''
-          import "package:test/src/bootstrap/node.dart";
-
-          import "${p.url.basename(id.path)}" as test;
-
-          void main() {
-            internalBootstrapNodeTest(() => test.main);
-          }
-        '''));
-
-    // If the user has their own HTML file for the test, let that take
-    // precedence. Otherwise, create our own basic file.
-    var htmlId = id.changeExtension('.html');
-    if (await transform.hasInput(htmlId)) return;
-
-    transform.addOutput(new Asset.fromString(htmlId, '''
-          <!DOCTYPE html>
-          <html>
-          <head>
-            <title>${HTML_ESCAPE.convert(id.path)} Test</title>
-            <link rel="x-dart-test"
-                  href="${HTML_ESCAPE.convert(p.url.basename(id.path))}">
-            <script src="packages/test/dart.js"></script>
-          </head>
-          </html>
-        '''));
-  }
-}
diff --git a/pubspec.yaml b/pubspec.yaml
index aa318fa..283ecdf 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,15 +1,14 @@
 name: test
-version: 0.12.36
+version: 0.12.37
 author: Dart Team <misc@dartlang.org>
 description: A library for writing dart unit tests.
 homepage: https://github.com/dart-lang/test
 environment:
-  sdk: '>=2.0.0-dev.22.0 <2.0.0'
+  sdk: '>=2.0.0-dev.52.0 <2.0.0'
 dependencies:
   analyzer: '>=0.26.4 <0.32.0'
   args: '>=0.13.1 <2.0.0'
   async: '>=1.13.0 <3.0.0'
-  barback: '>=0.14.0 <0.16.0'
   boolean_selector: '^1.0.0'
   collection: '^1.8.0'
   glob: '^1.0.0'