forked from tiajinsha/JKVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-apk.ps1
More file actions
22 lines (18 loc) · 901 Bytes
/
build-apk.ps1
File metadata and controls
22 lines (18 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "C:\Users\Administrator\AppData\Local\Android\Sdk"
$env:PATH = "$env:JAVA_HOME\bin;C:\nvm4w\nodejs;$env:ANDROID_HOME\platform-tools;$env:PATH"
# Create short path alias to avoid 260-char limit
subst Z: "C:\Users\Administrator\Desktop\claude code studly\reactBilibiliApp" 2>$null
Set-Location "Z:\android"
.\gradlew.bat assembleDebug --no-daemon
Write-Host ""
if ($LASTEXITCODE -eq 0) {
$apk = Get-ChildItem "Z:\android\app\build\outputs\apk\debug\*.apk" | Select-Object -First 1
Write-Host "SUCCESS! APK: $($apk.FullName)" -ForegroundColor Green
# Copy to Desktop
Copy-Item $apk.FullName "C:\Users\Administrator\Desktop\JKVideo-debug.apk"
Write-Host "Copied to Desktop: JKVideo-debug.apk" -ForegroundColor Cyan
} else {
Write-Host "Build FAILED" -ForegroundColor Red
}
subst Z: /D 2>$null