diff --git a/packages/shorebird_cli/lib/src/bundletool.dart b/packages/shorebird_cli/lib/src/bundletool.dart index 6b78f1db..266c36a4 100644 --- a/packages/shorebird_cli/lib/src/bundletool.dart +++ b/packages/shorebird_cli/lib/src/bundletool.dart @@ -48,11 +48,11 @@ class Bundletool { /// Deploy your app from an APK set. /// - /// e.g. `bundletool install-apks --apks=/MyApp/my_app.apks` + /// e.g. `bundletool install-apks --apks=/MyApp/my_app.apks --allow-downgrade` /// /// https://developer.android.com/tools/bundletool#deploy_with_bundletool Future installApks({required String apks}) async { - final result = await _exec('install-apks --apks=$apks'); + final result = await _exec('install-apks --apks=$apks --allow-downgrade'); if (result.exitCode != 0) { throw Exception('Failed to install apks: ${result.stderr}'); } diff --git a/packages/shorebird_cli/test/src/bundletool_test.dart b/packages/shorebird_cli/test/src/bundletool_test.dart index e2faa549..3da904b4 100644 --- a/packages/shorebird_cli/test/src/bundletool_test.dart +++ b/packages/shorebird_cli/test/src/bundletool_test.dart @@ -173,7 +173,7 @@ void main() { verify( () => process.run( 'java', - '''-jar ${p.join(workingDirectory.path, 'bundletool.jar')} install-apks --apks=$apks''' + '''-jar ${p.join(workingDirectory.path, 'bundletool.jar')} install-apks --apks=$apks --allow-downgrade''' .split(' '), environment: { 'JAVA_HOME': javaHome,