Commit 676a57c2 authored by Geoffrey Métais's avatar Geoffrey Métais

Fix BuildConfig.VERSION_CODE not set

parent 27876240
...@@ -136,6 +136,8 @@ android { ...@@ -136,6 +136,8 @@ android {
// make per-variant version code // make per-variant version code
applicationVariants.all { variant -> 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 //Custom APK name
variant.outputs.all { output -> variant.outputs.all { output ->
def outputName = "VLC-Android-" def outputName = "VLC-Android-"
...@@ -145,7 +147,6 @@ android { ...@@ -145,7 +147,6 @@ android {
outputFileName = outputName outputFileName = outputName
output.processManifest.doLast { output.processManifest.doLast {
// set the composite code // set the composite code
def generatedCode = variant.productFlavors.get(0).versionCode * 10000000 + defaultConfig.versionCode + variant.productFlavors.get(1).versionCode
String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml" String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml"
def manifestContent = file(manifestPath).getText() def manifestContent = file(manifestPath).getText()
manifestContent = manifestContent.replace('android:versionCode="1"', manifestContent = manifestContent.replace('android:versionCode="1"',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment