Initial commit: Android题库APP - Jetpack Compose + Retrofit
This commit is contained in:
45
build.bat
Normal file
45
build.bat
Normal file
@@ -0,0 +1,45 @@
|
||||
@echo off
|
||||
echo ========================================
|
||||
echo Build Android Project
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
:: Check gradle-wrapper.jar exists
|
||||
if not exist "gradle\wrapper\gradle-wrapper.jar" (
|
||||
echo [ERROR] gradle-wrapper.jar not found!
|
||||
echo.
|
||||
echo Please run fix script first:
|
||||
echo fix_gradle_wrapper.bat
|
||||
echo.
|
||||
echo Or download manually:
|
||||
echo https://github.com/gradle/gradle/tree/v8.13.0/gradle/wrapper
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo [1/4] Clean project build directory...
|
||||
if exist "build" rmdir /s /q build
|
||||
if exist "app\build" rmdir /s /q app\build
|
||||
echo Done!
|
||||
echo.
|
||||
|
||||
echo [2/4] Clean Gradle cache...
|
||||
if exist "%USERPROFILE%\.gradle\caches\8.13\groovy-dsl\070ba2b51e09fa9c0e770e7c757cc8a3" rmdir /s /q "%USERPROFILE%\.gradle\caches\8.13\groovy-dsl\070ba2b51e09fa9c0e770e7c757cc8a3" 2>nul
|
||||
if exist "%USERPROFILE%\.gradle\caches\8.13\transforms\44e7089f2786c22da3ed6c59f9f06cc8" rmdir /s /q "%USERPROFILE%\.gradle\caches\8.13\transforms\44e7089f2786c22da3ed6c59f9f06cc8" 2>nul
|
||||
echo Done!
|
||||
echo.
|
||||
|
||||
echo [3/4] Run Gradle clean...
|
||||
call gradlew.bat clean --no-daemon
|
||||
echo.
|
||||
|
||||
echo [4/4] Build Release version...
|
||||
call gradlew.bat assembleRelease --no-daemon --stacktrace
|
||||
echo.
|
||||
|
||||
echo ========================================
|
||||
echo Build Complete!
|
||||
echo APK location: app\build\outputs\apk\release\app-release-unsigned.apk
|
||||
echo ========================================
|
||||
pause
|
||||
Reference in New Issue
Block a user