[Android] Setup the remote access to generate aars
Nicolas Pomepuy
git at videolan.org
Thu Dec 5 06:57:32 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov 28 11:55:28 2024 +0100| [b34a927c394c61b454a1f068918bfecd247729ee] | committer: Nicolas Pomepuy
Setup the remote access to generate aars
> https://code.videolan.org/videolan/vlc-android/commit/b34a927c394c61b454a1f068918bfecd247729ee
---
application/app/build.gradle | 4 +++-
application/webserver/build.gradle | 18 +++++++++++++++++-
application/webserver/gradle.properties | 31 +++++++++++++++++++++++++++++++
build.gradle | 1 +
4 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/application/app/build.gradle b/application/app/build.gradle
index f1a7608d70..7c0056923c 100644
--- a/application/app/build.gradle
+++ b/application/app/build.gradle
@@ -158,7 +158,9 @@ android {
dependencies {
implementation project(':application:vlc-android')
implementation project(':application:television')
- implementation project(':application:webserver')
+ devImplementation project(':application:webserver')
+ debugImplementation project(':application:webserver')
+ releaseImplementation "org.videolan.android:remoteaccess:$rootProject.ext.remoteAccessVersion"
testImplementation project(':application:television')
testImplementation project(':application:webserver')
diff --git a/application/webserver/build.gradle b/application/webserver/build.gradle
index 1006beb2c0..270c135f09 100644
--- a/application/webserver/build.gradle
+++ b/application/webserver/build.gradle
@@ -1,8 +1,12 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
+ id 'com.vanniktech.maven.publish'
}
+ext {
+ library_version = "$rootProject.ext.remoteAccessVersion"
+}
android {
namespace 'org.videolan.vlc.webserver'
@@ -61,6 +65,16 @@ android {
buildFeatures {
buildConfig 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 = "vlc-android-remote-access-${library_version}.aar"
+ }
+ }
+ }
}
preBuild.dependsOn(webCopy)
@@ -84,4 +98,6 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
-}
\ No newline at end of file
+}
+
+apply from: '../../buildsystem/publish.gradle'
diff --git a/application/webserver/gradle.properties b/application/webserver/gradle.properties
new file mode 100644
index 0000000000..ee9ac55a81
--- /dev/null
+++ b/application/webserver/gradle.properties
@@ -0,0 +1,31 @@
+#
+# *************************************************************************
+# gradle.properties
+# **************************************************************************
+# Copyright © 2024 VLC authors and VideoLAN
+# Author: Nicolas POMEPUY
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+# ***************************************************************************
+#
+#
+#
+
+GROUP=org.videolan.android
+POM_ARTIFACT_ID=remote-access
+
+
+POM_NAME=VLC-Android-RemoteAccess
+POM_DESCRIPTION=Android port of VLC's Remote Access
+POM_INCEPTION_YEAR=2021
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 637947e65e..c430ef8bad 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,6 +42,7 @@ ext {
versionCode = 3050740
versionName = project.hasProperty('forceVlc4') && project.getProperty('forceVlc4') ? '4.0.0-preview - ' + versionCode : '3.6.0 Beta 4'
vlcMajorVersion = project.hasProperty('forceVlc4') && project.getProperty('forceVlc4') ? 4 : 3
+ remoteAccessVersion = '0.1.0'
libvlcVersion = vlcMajorVersion == 3 ? '3.6.0-eap13' :'4.0.0-eap16'
medialibraryVersion = vlcMajorVersion == 3 ? '0.13.13-rc13' : '0.13.13-vlc4-rc13'
minSdkVersion = 17
More information about the Android
mailing list