Prepare for dartdoc 0.40.0 (#2543)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a76a97..80aec21 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,17 @@
+## 0.40.0
+* More implementation added for Mustachio (#2481, #2482, #2488, #2491, #2497,
+  #2498, #2512, #2515, #2519, #2523, #2525)
+* originalMember is now an optional parameter to ModelElement(). #2507
+* Use custom handling for search, deleting jquery/typeahead libraries. (#2486,
+  #2483)
+* Small change to dartdoc exit/error text output. (#2489)
+* Fixed problem with stdout corruption in tool output due to null-safety
+  warnings. (#2493)
+* Connect interface types across intermediate classes. (#2495, #2485)
+* Update analyzer to 1.0.0 (#2524)  This version of dartdoc requires Dart 2.12
+  as a result.
+* Many minor internal cleanups updating code to newer Dart style and idioms.
+
 ## 0.39.0
 * More implementation added for Mustachio. (#2452, #2458, #2467)
 * Use `=` to document values for named parameters. (#2453, #2087)
diff --git a/dartdoc_options.yaml b/dartdoc_options.yaml
index 4ef1e83..b8bf2a4 100644
--- a/dartdoc_options.yaml
+++ b/dartdoc_options.yaml
@@ -1,4 +1,4 @@
 dartdoc:
   linkToSource:
     root: '.'
-    uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v0.39.0/%f%#L%l%'
+    uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v0.40.0/%f%#L%l%'
diff --git a/lib/src/version.dart b/lib/src/version.dart
index c19287d..84b74d8 100644
--- a/lib/src/version.dart
+++ b/lib/src/version.dart
@@ -1,2 +1,2 @@
 // Generated code. Do not modify.
-const packageVersion = '0.39.0';
+const packageVersion = '0.40.0';
diff --git a/pubspec.yaml b/pubspec.yaml
index 015e2ca..4daa1f0 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
 name: dartdoc
 # Run `grind build` after updating.
-version: 0.39.0
+version: 0.40.0
 description: A non-interactive HTML documentation generator for Dart source code.
 homepage: https://github.com/dart-lang/dartdoc
 environment: