This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Offline verification of the production common core + JVM ZIP adapter.
|
||||
# Uses an installed Kotlin/JVM compiler and kotlin-test.jar; does not claim an Android Gradle build.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
command -v kotlinc >/dev/null || { echo 'Install Kotlin (kotlinc) and a JDK first.' >&2; exit 1; }
|
||||
KOTLIN_BIN="$(command -v kotlinc)"
|
||||
KOTLIN_DIR="$(cd "$(dirname "$KOTLIN_BIN")/.." && pwd)"
|
||||
TEST_JAR="$KOTLIN_DIR/lib/kotlin-test.jar"
|
||||
[ -f "$TEST_JAR" ] || { echo "kotlin-test.jar not found: $TEST_JAR" >&2; exit 1; }
|
||||
mkdir -p out/offline-tests
|
||||
python3 scripts/prepare-offline-tests.py
|
||||
SOURCES=()
|
||||
while IFS= read -r source; do SOURCES+=("$source"); done < <(find core/src/commonMain platform-jvm/src/main out/offline-tests/generated -name '*.kt' | sort)
|
||||
kotlinc "${SOURCES[@]}" -jvm-target 17 -cp "$TEST_JAR" -include-runtime -d out/offline-tests/tests.jar
|
||||
java -cp "out/offline-tests/tests.jar:$TEST_JAR" dev.fileworkbench.testing.OfflineRunnerKt | tee out/offline-tests/results.txt
|
||||
Reference in New Issue
Block a user