@echo off setlocal EnableExtensions set "GRADLE_VERSION=9.7.1" set "APP_HOME=%~dp0" if "%APP_HOME:~-1%"=="\" set "APP_HOME=%APP_HOME:~0,-1%" set "DIST_ROOT=%USERPROFILE%\.gradle\pixelbanners-bootstrap" set "DIST_DIR=%DIST_ROOT%\gradle-%GRADLE_VERSION%" set "DIST_ZIP=%DIST_ROOT%\gradle-%GRADLE_VERSION%-bin.zip" set "GRADLE_BAT=%DIST_DIR%\bin\gradle.bat" if exist "%GRADLE_BAT%" goto run if not exist "%DIST_ROOT%" mkdir "%DIST_ROOT%" echo [AstraSoups] Gradle %GRADLE_VERSION% not found. Downloading... powershell -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; Invoke-WebRequest -UseBasicParsing 'https://services.gradle.org/distributions/gradle-%GRADLE_VERSION%-bin.zip' -OutFile '%DIST_ZIP%'" if errorlevel 1 ( echo. echo [AstraSoups] ERROR: Could not download Gradle %GRADLE_VERSION%. exit /b 1 ) echo [AstraSoups] Extracting Gradle... powershell -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; Expand-Archive -LiteralPath '%DIST_ZIP%' -DestinationPath '%DIST_ROOT%' -Force" if errorlevel 1 ( echo. echo [AstraSoups] ERROR: Could not extract Gradle. exit /b 1 ) del /q "%DIST_ZIP%" >nul 2>&1 :run call "%GRADLE_BAT%" -p "%APP_HOME%" %* exit /b %ERRORLEVEL%