fix(android): 修复rebuild选项删除aar后未重建的bug

将rebuild参数解析移到tsslib.aar存在检查之前,
确保删除aar后能触发gomobile重新编译。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-27 10:13:27 -08:00
parent 263be15028
commit 06dbe133c2
1 changed files with 15 additions and 9 deletions

View File

@ -75,6 +75,20 @@ echo [INFO] Using SDK from local.properties
type local.properties
echo.
:: Parse rebuild argument early - must happen BEFORE checking tsslib.aar
set REBUILD_REQUESTED=0
if "%1"=="rebuild" (
set REBUILD_REQUESTED=1
echo [INFO] Rebuild requested - deleting tsslib.aar to recompile Go code...
if exist "app\libs\tsslib.aar" (
del /f "app\libs\tsslib.aar"
echo [INFO] tsslib.aar deleted, will be rebuilt
) else (
echo [INFO] tsslib.aar not found, will be built fresh
)
echo.
)
:: Check and build tsslib.aar if needed
if not exist "app\libs\tsslib.aar" (
echo [INFO] tsslib.aar not found, attempting to build TSS library...
@ -186,17 +200,9 @@ if "%1"=="clean" set BUILD_TYPE=clean
if "%1"=="rebuild" set BUILD_TYPE=rebuild
if "%1"=="help" goto :show_help
:: Handle rebuild - delete tsslib.aar to force recompilation of Go code
:: Handle rebuild - aar deletion already done above, just set build type
if "%BUILD_TYPE%"=="rebuild" (
echo [INFO] Rebuild requested - deleting tsslib.aar to recompile Go code...
if exist "app\libs\tsslib.aar" (
del /f "app\libs\tsslib.aar"
echo [INFO] tsslib.aar deleted, will be rebuilt
) else (
echo [INFO] tsslib.aar not found, will be built fresh
)
set BUILD_TYPE=all
echo.
)
:: Show build type