[Android] Rework flutter build command

This commit is contained in:
2026-03-25 12:53:07 +01:00
parent 44ac517223
commit 54691e8837
2 changed files with 11 additions and 4 deletions
+5 -2
View File
@@ -1,8 +1,11 @@
$buildType = if ($args[0]) { $args[0] } else { "debug" }
$buildType = if ($args[0]) { $args[0] } else { "release" }
$buildName = if ($args[1]) { $args[1] } else { "0.0.0" }
$buildNumber = "$buildName-$(Get-Date -Format 'yyyyMMddHHmmss')"
$apkDir = "..\build\app\outputs\flutter-apk"
$baseName = "org.igox.apps.android.busylight-buddy"
flutter build apk --$buildType
flutter build apk --$buildType --build-name=${buildName} --build-number ${buildNumber} --target-platform android-arm,android-arm64,android-x64
# Rename APK
$oldApk = "$apkDir\app-$buildType.apk"
+6 -2
View File
@@ -1,9 +1,13 @@
#!/bin/bash
BUILD_TYPE=${1:-debug}
BUILD_TYPE=${1:-release}
BUILD_NAME=${2:-0.0.0}
BUILD_NUMBER="$BUILD_NAME-$(date +%Y%m%d%H%M%S)"
APK_DIR="../build/app/outputs/flutter-apk"
BASE_NAME="org.igox.apps.android.busylight-buddy"
flutter build apk --$BUILD_TYPE
flutter build apk --$BUILD_TYPE --build-name=$BUILD_NAME --build-number=$BUILD_NUMBER --target-platform android-arm,android-arm64,android-x64
# Rename APK
OLD_APK="$APK_DIR/app-$BUILD_TYPE.apk"