[Android] Revert "gradle: use base plugin to set the archive name"

Nicolas Pomepuy git at videolan.org
Tue Jul 21 07:21:29 UTC 2026


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Jul 21 08:55:20 2026 +0200| [ba34cca9fb6ef05ebd22d028d469a5b7191c2d58] | committer: Nicolas Pomepuy

Revert "gradle: use base plugin to set the archive name"

This reverts commit 27ce3a304a1ef6eb9af141bee8d46cfcf21ddf7d.

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

 application/remote-access-client/build.gradle | 17 +++++++++++------
 buildsystem/maven/deploy-to-mavencentral.sh   |  6 +++---
 medialibrary/build.gradle                     | 21 ++++++++++++---------
 3 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/application/remote-access-client/build.gradle b/application/remote-access-client/build.gradle
index b49ea57031..be8c1e9f71 100644
--- a/application/remote-access-client/build.gradle
+++ b/application/remote-access-client/build.gradle
@@ -24,7 +24,7 @@
 
 plugins {
     id 'com.android.library'
-    id 'base'
+    id 'org.jetbrains.kotlin.android'
     id 'com.vanniktech.maven.publish'
 }
 
@@ -32,11 +32,6 @@ ext {
     library_version = "$rootProject.ext.remoteAccessVersion"
 }
 
-base {
-    //Custom APK name
-    archivesName = "vlc-android-remote-access-${library_version}"
-}
-
 def remoteclientSourceDir = "$projectDir/remoteaccess"
 File remoteAccessPackage = file("$remoteclientSourceDir/package.json")
 def remoteAccessRevision = remoteAccessPackage.exists() ? providers.exec {
@@ -74,6 +69,16 @@ android {
         assets.srcDirs = ['assets']
     }
 
+    // Make per-variant version code
+    libraryVariants.all { variant ->
+        //Custom APK name
+        variant.outputs.each { output ->
+            if (output.outputFileName != null && output.outputFileName.endsWith('.aar')) {
+                output.outputFileName = "vlc-android-remote-access-${library_version}.aar"
+            }
+        }
+    }
+
     buildFeatures {
         resValues = true
     }
diff --git a/buildsystem/maven/deploy-to-mavencentral.sh b/buildsystem/maven/deploy-to-mavencentral.sh
index d6477ea6ea..a126f100ae 100755
--- a/buildsystem/maven/deploy-to-mavencentral.sh
+++ b/buildsystem/maven/deploy-to-mavencentral.sh
@@ -113,7 +113,7 @@ else
   mvn gpg:sign-and-deploy-file \
     --settings settings.xml \
     -DpomFile=$BASE_DIR/libvlc-all-$LIBVLC_VERSION.pom \
-    -Dfile=$BASE_DIR/libvlc-all-$LIBVLC_VERSION-release.aar \
+    -Dfile=$BASE_DIR/libvlc-all-$LIBVLC_VERSION.aar \
     -Dsources=$BASE_DIR/libvlc-all-$LIBVLC_VERSION-sources.jar \
     -Djavadoc=$BASE_DIR/libvlc-all-$LIBVLC_VERSION-javadoc.jar \
     -Durl="https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/" \
@@ -134,7 +134,7 @@ else
   mvn gpg:sign-and-deploy-file \
     --settings settings.xml \
     -DpomFile=$BASE_DIR/medialibrary-all-$MEDIALIB_VERSION.pom \
-    -Dfile=$BASE_DIR/medialibrary-all-$MEDIALIB_VERSION-release.aar \
+    -Dfile=$BASE_DIR/medialibrary-all-$MEDIALIB_VERSION.aar \
     -Dsources=$BASE_DIR/medialibrary-all-$MEDIALIB_VERSION-sources.jar \
     -Djavadoc=$BASE_DIR/medialibrary-all-$MEDIALIB_VERSION-javadoc.jar \
     -Durl="https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/" \
@@ -155,7 +155,7 @@ else
   mvn gpg:sign-and-deploy-file \
     --settings settings.xml \
     -DpomFile=$BASE_DIR/remote-access-$REMOTE_ACCESS_VERSION.pom \
-    -Dfile=$BASE_DIR/remote-access-$REMOTE_ACCESS_VERSION-release.aar \
+    -Dfile=$BASE_DIR/remote-access-$REMOTE_ACCESS_VERSION.aar \
     -Dsources=$BASE_DIR/remote-access-$REMOTE_ACCESS_VERSION-sources.jar \
     -Djavadoc=$BASE_DIR/remote-access-$REMOTE_ACCESS_VERSION-javadoc.jar \
     -Durl="https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/" \
diff --git a/medialibrary/build.gradle b/medialibrary/build.gradle
index 192716ee4a..6846e44249 100644
--- a/medialibrary/build.gradle
+++ b/medialibrary/build.gradle
@@ -20,20 +20,13 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *  ***************************************************************************
  */
-plugins {
-    id 'com.android.library'
-    id 'base'
-    id 'com.vanniktech.maven.publish'
-}
+apply plugin: 'com.android.library'
+apply plugin: "com.vanniktech.maven.publish"
 
 def abi = project.hasProperty('vlcLibVariant') ? project.getProperty('vlcLibVariant') : 'all'
 ext {
     library_version = "$rootProject.ext.medialibraryVersion"
 }
-base {
-    //Custom APK name
-    archivesName = "medialibrary-${abi}-${library_version}"
-}
 android {
     namespace = 'org.videolan.medialibrary'
 
@@ -81,6 +74,16 @@ android {
         renderScript = true
         aidl = true
     }
+
+    // Make per-variant version code
+    libraryVariants.all { variant ->
+        //Custom APK name
+        variant.outputs.each { output ->
+            if (output.outputFileName != null && output.outputFileName.endsWith('.aar')) {
+                output.outputFileName = "medialibrary-${abi}-${library_version}.aar"
+            }
+        }
+    }
 }
 
 clean {



More information about the Android mailing list