fix: bump Android mobile versionCode

Agent-Logs-Url: https://github.com/we-promise/sure/sessions/c7b35fa9-a638-489b-803f-a935ccd7a301

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-02 11:30:03 +00:00
committed by GitHub
parent d809add5a1
commit daaf4fb564
3 changed files with 28 additions and 1 deletions

View File

@@ -172,6 +172,8 @@ flutter build apk --release
flutter build appbundle --release
```
Android release metadata comes from `pubspec.yaml` (`version: <name>+<code>`). Keep the numeric build code increasing for every release so Android can install upgrades over older APKs.
### iOS
```bash

View File

@@ -1,7 +1,7 @@
name: sure_mobile
description: A mobile app for Sure personal finance management
publish_to: 'none'
version: 0.6.9+9
version: 0.6.9+12
environment:
sdk: '>=3.0.0 <4.0.0'

View File

@@ -0,0 +1,25 @@
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('Android versionCode stays above the last published release', () {
final pubspec = File('pubspec.yaml').readAsStringSync();
final versionMatch = RegExp(r'^version:\s*([^\s]+)$', multiLine: true).firstMatch(pubspec);
expect(versionMatch, isNotNull);
final version = versionMatch!.group(1)!;
final versionParts = version.split('+');
expect(versionParts.length, 2);
final versionCode = int.parse(versionParts[1]);
expect(
versionCode,
greaterThan(11),
reason: 'Android upgrades require monotonically increasing versionCode values; v0.6.8 shipped with versionCode 11.',
);
});
}