Commit c88eb704 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Version the libVLC .aar files

parent 28b65fff
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.videolan" android:versionCode="2" android:versionName="2.1">
package="org.videolan" android:versionCode="2" android:versionName="3.0.0">
<application>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="22"/>
</application>
......
......@@ -29,6 +29,21 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
// Make per-variant version code
libraryVariants.all { variant ->
def manifestParser = new com.android.builder.core.DefaultManifestParser()
// get the version code of each flavor
def vlcVersion = manifestParser.getVersionName(android.sourceSets.main.manifest.srcFile)
//Custom APK name
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "libvlc-${vlcVersion}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}
/*
......
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