Files
youtube_personal/BUILD_APK_RELEASE.ps1
T

16 lines
493 B
PowerShell

$ErrorActionPreference = "Stop"
$ProjectRoot = $PSScriptRoot
Set-Location $ProjectRoot
Write-Host "=== Build APK Release ===" -ForegroundColor Cyan
flutter clean
flutter pub get
flutter build apk --release
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$apk = Join-Path $ProjectRoot "build\app\outputs\flutter-apk\app-release.apk"
if (Test-Path $apk) {
Write-Host ""
Write-Host "[OK] APK : $apk" -ForegroundColor Green
} else {
throw "Build termine mais APK introuvable : $apk"
}