Support code_builder 4.x and bump mockito to 5.0.5 (#387)

PiperOrigin-RevId: 369312175

Co-authored-by: srawlins <srawlins@google.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d7afb4..cc322ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 5.0.5
+
+* Support 4.x releases of code_builder.
+
 ## 5.0.4
 
 * Allow calling methods with void return types w/o stubbing.
diff --git a/lib/src/version.dart b/lib/src/version.dart
index 2c9f52f..d1809d2 100644
--- a/lib/src/version.dart
+++ b/lib/src/version.dart
@@ -1 +1 @@
-const packageVersion = '5.0.4';
+const packageVersion = '5.0.5';
diff --git a/pubspec.yaml b/pubspec.yaml
index 543d0b6..7537f17 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: mockito
-version: 5.0.4
+version: 5.0.5
 
 description: A mock framework inspired by Mockito.
 homepage: https://github.com/dart-lang/mockito
@@ -10,7 +10,7 @@
 dependencies:
   analyzer: ^1.0.0
   build: '>=1.3.0 <3.0.0'
-  code_builder: ^3.7.0
+  code_builder: '>=3.7.0 <5.0.0'
   collection: ^1.15.0
   dart_style: '>=1.3.6 <3.0.0'
   matcher: ^0.12.10