[Android] buildsystem: only pass Maven repo parameters if they are set

Steve Lhomme git at videolan.org
Mon Jun 16 13:47:41 UTC 2025


vlc-android | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun 12 13:21:12 2025 +0200| [6be1ead0ae66baabbeac2b40a1023e36ad6bdb01] | committer: Duncan McNamara

buildsystem: only pass Maven repo parameters if they are set

Only the publishToMavenLocal targets should need it.

> https://code.videolan.org/videolan/vlc-android/commit/6be1ead0ae66baabbeac2b40a1023e36ad6bdb01
---

 buildsystem/compile.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh
index 374e908f5d..b50af577c5 100755
--- a/buildsystem/compile.sh
+++ b/buildsystem/compile.sh
@@ -148,9 +148,7 @@ else
     exit 1
 fi
 
-if [ -z "$M2_REPO" ]; then
-  M2_REPO=""
-else
+if [ -n "$M2_REPO" ]; then
   if test -d "$M2_REPO"; then
     echo "Custom local maven repository found"
   else
@@ -376,7 +374,9 @@ fi
 if [ "$FORCE_VLC_4" = 1 ]; then
     gradle_prop="-PforceVlc4=true"
 fi
-gradle_prop="$gradle_prop -Dmaven.repo.local=$M2_REPO"
+if [ -n "$M2_REPO" ]; then
+    gradle_prop="$gradle_prop -Dmaven.repo.local=$M2_REPO"
+fi
 
 if [ "$BUILD_LIBVLC" = 1 ];then
     GRADLE_VLC_SRC_DIRS="$GRADLE_VLC_SRC_DIRS" GRADLE_ABI=$GRADLE_ABI ./gradlew ${gradle_prop} -p ${VLC_LIBJNI_PATH}/libvlc assemble${BUILDTYPE}



More information about the Android mailing list