@echo off
rem Build sources and run all JUnit tests without Maven (JDK 17+ required).
setlocal
cd /d "%~dp0"
if not exist out mkdir out
dir /s /b src\main\java\*.java src\test\java\*.java > sources.txt
javac -encoding UTF-8 -cp lib\junit-platform-console-standalone-1.10.2.jar -d out @sources.txt
if errorlevel 1 (
  echo COMPILE FAILED
  exit /b 1
)
del sources.txt
java -jar lib\junit-platform-console-standalone-1.10.2.jar execute --class-path out --scan-class-path
endlocal
