[Android] buildsystem: get the libvlcjni sources before generating the gradle wrapper

Steve Lhomme git at videolan.org
Fri Feb 20 12:30:14 UTC 2026


vlc-android | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb 17 14:40:38 2026 +0100| [9e3b6c89846398cd7a10d604f9e63c20c314c195] | committer: Steve Lhomme

buildsystem: get the libvlcjni sources before generating the gradle wrapper

> https://code.videolan.org/videolan/vlc-android/commit/9e3b6c89846398cd7a10d604f9e63c20c314c195
---

 buildsystem/compile.sh | 60 +++++++++++++++++++++++++++-----------------------
 1 file changed, 32 insertions(+), 28 deletions(-)

diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh
index 2c5c552e6d..5e89170e15 100755
--- a/buildsystem/compile.sh
+++ b/buildsystem/compile.sh
@@ -274,6 +274,38 @@ if [ "$FORCE_VLC_4" = 1 ]; then
     gradle_prop="-PforceVlc4=true"
 fi
 
+####################
+# Fetch libVLCjni source #
+####################
+
+
+if [ "$FORCE_VLC_4" = 1 ]; then
+    LIBVLCJNI_TESTED_HASH=ce3b7bec0738ae4d2a9721388b789bd23a733c2a
+    LIBVLCJNI_BRANCH="master"
+else
+    LIBVLCJNI_TESTED_HASH=7dea540bd34e56bb6510fb06ea4abdbebd2f1a0a
+    LIBVLCJNI_BRANCH="libvlcjni-3.x"
+fi
+LIBVLCJNI_REPOSITORY=https://code.videolan.org/videolan/libvlcjni.git
+
+: ${VLC_LIBJNI_PATH:="$(pwd -P)/libvlcjni"}
+
+if [ ! -d "$VLC_LIBJNI_PATH" ] || [ ! -d "$VLC_LIBJNI_PATH/.git" ]; then
+    diagnostic "libvlcjni sources: not found, cloning"
+    if [ ! -d "$VLC_LIBJNI_PATH" ]; then
+        git clone --single-branch --branch ${LIBVLCJNI_BRANCH} "${LIBVLCJNI_REPOSITORY}"
+        cd libvlcjni
+    else # folder exist with only the artifacts
+        cd libvlcjni
+        git init
+        git remote add origin "${LIBVLCJNI_REPOSITORY}"
+        git pull origin ${LIBVLCJNI_BRANCH}
+    fi
+    git reset --hard ${LIBVLCJNI_TESTED_HASH} || fail "libvlcjni sources: LIBVLCJNI_TESTED_HASH ${LIBVLCJNI_TESTED_HASH} not found"
+    init_local_props local.properties || { echo "Error initializing local.properties"; exit $?; }
+    cd ..
+fi
+
 ##########
 # GRADLE #
 ##########
@@ -314,34 +346,6 @@ fi
 # Fetch VLC source #
 ####################
 
-
-if [ "$FORCE_VLC_4" = 1 ]; then
-    LIBVLCJNI_TESTED_HASH=ce3b7bec0738ae4d2a9721388b789bd23a733c2a
-    LIBVLCJNI_BRANCH="master"
-else
-    LIBVLCJNI_TESTED_HASH=7dea540bd34e56bb6510fb06ea4abdbebd2f1a0a
-    LIBVLCJNI_BRANCH="libvlcjni-3.x"
-fi
-LIBVLCJNI_REPOSITORY=https://code.videolan.org/videolan/libvlcjni.git
-
-: ${VLC_LIBJNI_PATH:="$(pwd -P)/libvlcjni"}
-
-if [ ! -d "$VLC_LIBJNI_PATH" ] || [ ! -d "$VLC_LIBJNI_PATH/.git" ]; then
-    diagnostic "libvlcjni sources: not found, cloning"
-    if [ ! -d "$VLC_LIBJNI_PATH" ]; then
-        git clone --single-branch --branch ${LIBVLCJNI_BRANCH} "${LIBVLCJNI_REPOSITORY}"
-        cd libvlcjni
-    else # folder exist with only the artifacts
-        cd libvlcjni
-        git init
-        git remote add origin "${LIBVLCJNI_REPOSITORY}"
-        git pull origin ${LIBVLCJNI_BRANCH}
-    fi
-    git reset --hard ${LIBVLCJNI_TESTED_HASH} || fail "libvlcjni sources: LIBVLCJNI_TESTED_HASH ${LIBVLCJNI_TESTED_HASH} not found"
-    init_local_props local.properties || { echo "Error initializing local.properties"; exit $?; }
-    cd ..
-fi
-
 # If you want to use an existing vlc dir add its path to an VLC_SRC_DIR env var
 if [ -z "$VLC_SRC_DIR" ]; then
     get_vlc_args=



More information about the Android mailing list