From ab00210b37b56f32da1d4e48188e4584c50e638b Mon Sep 17 00:00:00 2001 From: yangfl Date: Thu, 2 Dec 2021 20:49:35 +0100 Subject: [PATCH] Fix script to build without gradle The PLATFORM variable is assigned either from $ANDROID_PLATFORM or gets a default value (currently $PLATFORM_VERSION). The check to use either dx (SDK < 31) or d8 (SDK >= 31) must be based on the actual $PLATFORM, not the default $PLATFORM_VERSION. Refs 52138fd9213216a21fbdcda4d430394d7c8f0979 Refs PR #2850 Signed-off-by: Romain Vimont --- server/build_without_gradle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/build_without_gradle.sh b/server/build_without_gradle.sh index 0f86c29f..c3c6630c 100755 --- a/server/build_without_gradle.sh +++ b/server/build_without_gradle.sh @@ -57,7 +57,7 @@ javac -bootclasspath "$ANDROID_JAR" -cp "$CLASSES_DIR" -d "$CLASSES_DIR" \ echo "Dexing..." cd "$CLASSES_DIR" -if [[ $PLATFORM_VERSION -lt 31 ]] +if [[ $PLATFORM -lt 31 ]] then # use dx "$ANDROID_HOME/build-tools/$BUILD_TOOLS/dx" --dex \