[Android] buildsystem: pass the library/apk ABI variant name as a property to medialibrary
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:04:30 2025 +0200| [ab47930381208c73d745a37186251fc40900bbe9] | committer: Duncan McNamara
buildsystem: pass the library/apk ABI variant name as a property to medialibrary
It's lowercase "all" by default.
It's only set to a specialized value when building libvlc and medialib libraries.
> https://code.videolan.org/videolan/vlc-android/commit/ab47930381208c73d745a37186251fc40900bbe9
---
buildsystem/compile.sh | 3 ++-
buildsystem/gitlab/.gitlab-ci.yml | 4 ++--
medialibrary/build.gradle | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh
index e8b25225e7..21cbcb8c72 100755
--- a/buildsystem/compile.sh
+++ b/buildsystem/compile.sh
@@ -380,7 +380,8 @@ if [ "$BUILD_LIBVLC" = 1 ];then
GRADLE_ABI=$GRADLE_ABI ./gradlew ${gradle_prop} -p ${VLC_LIBJNI_PATH}/libvlc assemble${BUILDTYPE}
RUN=0
elif [ "$BUILD_MEDIALIB" = 1 ]; then
- GRADLE_ABI=$GRADLE_ABI ./gradlew ${gradle_prop} -p medialibrary assemble${BUILDTYPE}
+ gradle_prop="$gradle_prop -PvlcLibVariant=$GRADLE_ABI"
+ ./gradlew ${gradle_prop} -p medialibrary assemble${BUILDTYPE}
RUN=0
else
if [ "$TEST" = 1 ] || [ "$RUN" = 1 ]; then
diff --git a/buildsystem/gitlab/.gitlab-ci.yml b/buildsystem/gitlab/.gitlab-ci.yml
index d6ac95d650..a5c9bf6e81 100644
--- a/buildsystem/gitlab/.gitlab-ci.yml
+++ b/buildsystem/gitlab/.gitlab-ci.yml
@@ -448,7 +448,7 @@ publish_libs:
- git config --global --add safe.directory $CI_PROJECT_DIR/libvlcjni
- ./buildsystem/compile.sh --init -b
- GRADLE_ABI=ALL ./gradlew -Dmaven.repo.local=$M2_REPO -p libvlcjni publishToMavenLocal
- - GRADLE_ABI=ALL ./gradlew -Dmaven.repo.local=$M2_REPO -p medialibrary publishToMavenLocal
+ - ./gradlew -Dmaven.repo.local=$M2_REPO -p medialibrary publishToMavenLocal
artifacts:
name: "${CI_COMMIT_TAG}.dbg"
paths:
@@ -486,7 +486,7 @@ publish_libs-v4:
- git config --global --add safe.directory $CI_PROJECT_DIR/libvlcjni
- ./buildsystem/compile.sh --init -b -vlc4
- GRADLE_ABI=ALL ./gradlew -Dmaven.repo.local=$M2_REPO -PforceVlc4=true -p libvlcjni publishToMavenLocal
- - GRADLE_ABI=ALL ./gradlew -Dmaven.repo.local=$M2_REPO -PforceVlc4=true -p medialibrary publishToMavenLocal
+ - ./gradlew -Dmaven.repo.local=$M2_REPO -PforceVlc4=true -p medialibrary publishToMavenLocal
artifacts:
name: "${CI_COMMIT_TAG}.dbg"
paths:
diff --git a/medialibrary/build.gradle b/medialibrary/build.gradle
index 497290338c..d3f58dfeb9 100644
--- a/medialibrary/build.gradle
+++ b/medialibrary/build.gradle
@@ -23,7 +23,7 @@
apply plugin: 'com.android.library'
apply plugin: "com.vanniktech.maven.publish"
-def abi = System.getenv('GRADLE_ABI')?.toLowerCase()
+def abi = project.hasProperty('vlcLibVariant') ? project.getProperty('vlcLibVariant') : 'all'
ext {
library_version = "$rootProject.ext.medialibraryVersion"
}
More information about the Android
mailing list