Verman 🦸♂️
Your friendly neighborhood version manager for Flutter projects.
Stop juggling versions between pubspec.yaml
, build.gradle
, and Info.plist
. Verman
automates versioning, ensuring consistency across your entire Flutter project with simple, intuitive commands.
The Problem
Managing your app's version can be a repetitive and error-prone task. You update pubspec.yaml
...
# pubspec.yaml
version: 1.2.4+6
...then you have to remember to update build.gradle
...
// android/app/build.gradle
android {
defaultConfig {
versionCode 6
versionName "1.2.4"
}
}
...and also Info.plist
.
<!-- ios/Runner/Info.plist -->
<key>CFBundleShortVersionString</key>
<string>1.2.4</string>
<key>CFBundleVersion</key>
<string>6</string>
Forgetting a step leads to inconsistencies. Verman
solves this.
Features ✨
- View Current Version: Instantly see your project's version.
- Increment with Ease: Bump your
major
,minor
, orpatch
version. The build number is automatically incremented. - Check Consistency: Verify that your Android and iOS versions match your
pubspec.yaml
. - Sync Instantly: Push the version from
pubspec.yaml
to your platform-specific files. - Smart Detection: Intelligently handles both hardcoded versions and modern Flutter projects that use variables like
flutter.versionCode
and$(FLUTTER_BUILD_NAME)
.
Installation
Activate verman
globally from your terminal.
# From pub.flutter-io.cn (once published)
dart pub global activate verman
# Or, activate from your local source code
dart pub global activate --source path .
Usage
Run verman
commands from the root of your Flutter project.
verman current
Displays the current version from pubspec.yaml
.
$ verman current
Current version: 1.2.3+4
verman increment <part>
Increments the version. part
can be major
, minor
, or patch
. The build number is always incremented.
$ verman increment patch
Success: Updated version to 1.2.4+5
verman check-platforms
Checks for version consistency across pubspec.yaml
, Android, and iOS.
$ verman check-platforms
Checking platform files against pubspec version: 1.2.3+4...
Android (android/app/build.gradle) version: 1.2.0 (3) - ❌ Out of Sync
iOS (ios/Runner/Info.plist) - ✅ In Sync (using Flutter variables)
verman sync
Updates build.gradle
and Info.plist
to match the version in pubspec.yaml
.
$ verman sync
Syncing version 1.2.3+4 to platforms...
Android (android/app/build.gradle) - ✅ Synced.
iOS (ios/Runner/Info.plist) - ✅ Already configured to use Flutter variables.
Contributors ✨
A big thank you to all the contributors who have helped make this project better!
- artkinx - Idea, initial work, and feature development.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Libraries
- core/commands/base_command
- core/commands/build_command
- core/commands/check_platform_command
- core/commands/current_command
- core/commands/increment_command
- core/commands/init_command
- core/commands/package_version_command
- core/commands/sync_command
- core/services/command_service
- core/services/file_service
- models/pubspec_content_model
- verman