From 676a57c2f69a76a37e64f3e264f69ac457e56de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20M=C3=A9tais?= Date: Tue, 27 Feb 2018 15:26:35 +0100 Subject: [PATCH] Fix BuildConfig.VERSION_CODE not set --- vlc-android/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle index 0a829d99f..1dba16b6d 100644 --- a/vlc-android/build.gradle +++ b/vlc-android/build.gradle @@ -136,6 +136,8 @@ android { // make per-variant version code applicationVariants.all { variant -> + def generatedCode = variant.productFlavors.get(0).versionCode * 10000000 + defaultConfig.versionCode + variant.productFlavors.get(1).versionCode + variant.mergedFlavor.versionCode = generatedCode //Custom APK name variant.outputs.all { output -> def outputName = "VLC-Android-" @@ -145,7 +147,6 @@ android { outputFileName = outputName output.processManifest.doLast { // set the composite code - def generatedCode = variant.productFlavors.get(0).versionCode * 10000000 + defaultConfig.versionCode + variant.productFlavors.get(1).versionCode String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml" def manifestContent = file(manifestPath).getText() manifestContent = manifestContent.replace('android:versionCode="1"',