[Android] buildsystem: factorize the gradle target used for all builds
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 10:59:30 2025 +0200| [ae2a0b64f33a98ea050993accf258e85b27d4eba] | committer: Duncan McNamara
buildsystem: factorize the gradle target used for all builds
We may need to do tests for libraries someday.
> https://code.videolan.org/videolan/vlc-android/commit/ae2a0b64f33a98ea050993accf258e85b27d4eba
---
buildsystem/compile.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh
index 21cbcb8c72..1c8da7e0f0 100755
--- a/buildsystem/compile.sh
+++ b/buildsystem/compile.sh
@@ -368,6 +368,12 @@ elif [ "$NO_TV" = 1 ]; then
elif [ "$RELEASE" = 1 ]; then
BUILDTYPE="Release"
fi
+if [ "$TEST" = 1 ] || [ "$RUN" = 1 ]; then
+ ACTION="install"
+else
+ ACTION="assemble"
+fi
+TARGET="${ACTION}${BUILDTYPE}"
if [ "$FORCE_VLC_4" = 1 ]; then
gradle_prop="-PforceVlc4=true"
@@ -377,19 +383,13 @@ if [ -n "$M2_REPO" ]; then
fi
if [ "$BUILD_LIBVLC" = 1 ];then
- GRADLE_ABI=$GRADLE_ABI ./gradlew ${gradle_prop} -p ${VLC_LIBJNI_PATH}/libvlc assemble${BUILDTYPE}
+ GRADLE_ABI=$GRADLE_ABI ./gradlew ${gradle_prop} -p ${VLC_LIBJNI_PATH}/libvlc $TARGET
RUN=0
elif [ "$BUILD_MEDIALIB" = 1 ]; then
gradle_prop="$gradle_prop -PvlcLibVariant=$GRADLE_ABI"
- ./gradlew ${gradle_prop} -p medialibrary assemble${BUILDTYPE}
+ ./gradlew ${gradle_prop} -p medialibrary $TARGET
RUN=0
else
- if [ "$TEST" = 1 ] || [ "$RUN" = 1 ]; then
- ACTION="install"
- else
- ACTION="assemble"
- fi
- TARGET="${ACTION}${BUILDTYPE}"
./gradlew ${gradle_prop} $TARGET
if [ "$BUILDTYPE" = "Release" ] && [ "$ACTION" = "assemble" ]; then
TARGET="bundle${BUILDTYPE}"
More information about the Android
mailing list