Skip to content

Display and control your Android device

Extract ANDROID_JAR path in build script

Romain Vimont1bb0df5da17a
diff --git a/server/build_without_gradle.sh b/server/build_without_gradle.sh
index 05b822ba..926c19f5 100755
--- a/server/build_without_gradle.sh
+++ b/server/build_without_gradle.sh
@@ -21,6 +21,7 @@ BUILD_DIR="$(realpath ${BUILD_DIR:-build_manual})"
CLASSES_DIR="$BUILD_DIR/classes"
SERVER_DIR=$(dirname "$0")
SERVER_BINARY=scrcpy-server
+ANDROID_JAR="$ANDROID_HOME/platforms/android-$PLATFORM/android.jar"
echo "Platform: android-$PLATFORM"
echo "Build-tools: $BUILD_TOOLS"
@@ -47,8 +48,8 @@ cd "$SERVER_DIR/src/main/aidl"
echo "Compiling java sources..."
cd ../java
-javac -bootclasspath "$ANDROID_HOME/platforms/android-$PLATFORM/android.jar" \
- -cp "$CLASSES_DIR" -d "$CLASSES_DIR" -source 1.8 -target 1.8 \
+javac -bootclasspath "$ANDROID_JAR" -cp "$CLASSES_DIR" -d "$CLASSES_DIR" \
+ -source 1.8 -target 1.8 \
com/genymobile/scrcpy/*.java \
com/genymobile/scrcpy/wrappers/*.java