Use pkg:build_version to keep the pkg version in sync
diff --git a/lib/markdown.dart b/lib/markdown.dart
index 8b477d4..b179fe0 100644
--- a/lib/markdown.dart
+++ b/lib/markdown.dart
@@ -5,10 +5,13 @@
/// Parses text in a Markdown-like format and renders to HTML.
library markdown;
+import 'src/version.dart';
+
export 'src/ast.dart';
export 'src/block_parser.dart';
export 'src/document.dart';
export 'src/extension_set.dart';
export 'src/html_renderer.dart';
export 'src/inline_parser.dart';
-export 'src/version.dart';
+
+const version = packageVersion;
diff --git a/lib/src/version.dart b/lib/src/version.dart
index 954db0b..9f5b2d1 100644
--- a/lib/src/version.dart
+++ b/lib/src/version.dart
@@ -1,2 +1,2 @@
-/// The current version of markdown.
-final String version = '2.0.2';
+// Generated code. Do not modify.
+const packageVersion = '2.0.3-dev';
diff --git a/pubspec.yaml b/pubspec.yaml
index 1e13a33..feb9d45 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -17,6 +17,7 @@
dev_dependencies:
build_runner: ^1.0.0
+ build_version: ^2.0.0
build_web_compilers: ^0.4.0
collection: ^1.2.0
expected_output: ^1.2.1
diff --git a/test/version_test.dart b/test/version_test.dart
index 36fcfd3..cb2f621 100644
--- a/test/version_test.dart
+++ b/test/version_test.dart
@@ -24,7 +24,7 @@
loadYaml(new File(pubspecFile).readAsStringSync()) as YamlMap;
expect(binVersion, pubspecContent['version'],
- reason: 'The version reported by bin/markdown.dart '
- 'should match the version in pubspec.');
+ reason: 'The version reported by bin/markdown.dart should match the '
+ 'version in pubspec. Run `pub run build_runner build` to update.');
});
}