[Android] Use a dedicated version code for the no tv builds

Nicolas Pomepuy git at videolan.org
Thu Jun 13 11:54:36 UTC 2024


vlc-android | branch: refs/tags/3.6.0-TEST | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Jun 13 13:54:00 2024 +0200| [03c197d751aeb911f2dea4a6c23c3584f0bb12f3] | committer: Nicolas Pomepuy

Use a dedicated version code for the no tv builds

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

 application/app/build.gradle |  7 ++++++-
 build.gradle                 | 15 +++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/application/app/build.gradle b/application/app/build.gradle
index 3710646dbd..1c709281c5 100644
--- a/application/app/build.gradle
+++ b/application/app/build.gradle
@@ -115,6 +115,7 @@ android {
     }
 
     def abiCodes = ['x86': 5, 'x86_64': 8, 'armeabi-v7a': 4, 'arm64-v8a': 7]
+    def abiCodesNoTv = ['x86': 1, 'x86_64': 2, 'armeabi-v7a': 3, 'arm64-v8a': 6]
     lint {
         abortOnError false
         disable 'MissingTranslation', 'ExtraTranslation'
@@ -127,7 +128,11 @@ android {
             def outputAbi = output.getFilter(com.android.build.OutputFile.ABI)
             def abiName = System.getenv('GRADLE_ABI')?.toLowerCase() ?: "all"
             if (outputAbi != null) abiName = outputAbi
-            output.versionCodeOverride = 10000000 + defaultConfig.versionCode + abiCodes.get(abiName, 0)
+            def versionCode = abiCodes.get(abiName, 0)
+            if (variant.buildType.name == "noTv") {
+                versionCode = abiCodesNoTv.get(abiName, 0)
+            }
+            output.versionCodeOverride = 10000000 + defaultConfig.versionCode + versionCode
             def outputName = "VLC-Android-"
             outputName += variant.versionName.replace(" ", "-")
             if (variant.buildType.name == "debug") outputName += "-debug"
diff --git a/build.gradle b/build.gradle
index 69031096ba..f7291f9b4f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -89,6 +89,9 @@ ext {
 //    NN: Minor version from 00 to 99
 //    RR: Micro/Revision version from 00 to 99
 //    AA: ABI from 0 to 99
+//    Starting from 13050420 the last digit represents the ABI and the variant (normal or NoTv)
+//
+//    Old values
 //    0 is dev
 //    1 was ARMv5        (deprecated)
 //    2 was ARMv6-nofpu  (deprecated)
@@ -98,5 +101,17 @@ ext {
 //    6 is MIPS
 //    7 is ARMv8
 //    8 is x86_64
+//    9 is MIPS6
+//
+//    New values
+//    0 is dev
+//    1 is x86 No TV
+//    2 is x86_64 No TV
+//    3 is ARMv7-A No TV
+//    4 is ARMv7-A
+//    5 is x86
+//    6 is ARMv8 No TV
+//    7 is ARMv8
+//    8 is x86_64
 //    9 is MIPS64
 }



More information about the Android mailing list