Commit f9e7715e authored by Geoffrey Métais's avatar Geoffrey Métais

Upgrade AGP to v3.2.0

parent 23f13f50
......@@ -31,6 +31,7 @@ android {
defaultConfig {
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
}
buildTypes {
release {
......
......@@ -24,8 +24,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.videolan.vlc.plugin.api">
<uses-sdk android:minSdkVersion="14" />
<application android:label="@string/app_name"
android:supportsRtl="true">
......
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.android_plugin_version = '3.1.4'
ext.kotlin_version = '1.2.70'
ext.android_plugin_version = '3.2.0'
ext.kotlin_version = '1.2.71'
ext.kotlinx_version = '0.26.1'
repositories {
flatDir dirs: "gradle/plugins"
......
......@@ -116,7 +116,7 @@ fi
if [ ! -d "gradle/wrapper" ]; then
diagnostic "Downloading gradle"
GRADLE_VERSION=4.4
GRADLE_VERSION=4.6
GRADLE_URL=https://download.videolan.org/pub/contrib/gradle/gradle-${GRADLE_VERSION}-bin.zip
wget ${GRADLE_URL} 2>/dev/null || curl -O ${GRADLE_URL}
checkfail "gradle: download failed"
......
<?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="3.0.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>
</manifest>
apply plugin: 'com.android.library'
import com.android.builder.core.DefaultManifestParser
android {
compileSdkVersion rootProject.ext.compileSdkVersion
......@@ -28,9 +26,7 @@ android {
// Make per-variant version code
libraryVariants.all { variant ->
def manifestParser = new DefaultManifestParser(android.sourceSets.main.manifest.srcFile)
// get the version code of each flavor
def vlcVersion = manifestParser.getVersionName()
def vlcVersion = rootProject.ext.versionName
//Custom APK name
variant.outputs.all { output ->
if (outputFileName != null && outputFileName.endsWith('.aar')) {
......
......@@ -2,8 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.videolan.medialibrary">
<uses-sdk android:minSdkVersion="14" />
<application/>
</manifest>
......@@ -153,22 +153,14 @@ android {
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 ->
//Custom APK name and versionCode
variant.outputs.each { output ->
output.versionCodeOverride = generatedCode
def outputName = "VLC-Android-"
if (variant.productFlavors.get(0).name != "vanilla")
outputName += variant.productFlavors.get(0).name.toUpperCase() + "-"
outputName += variant.versionName + "-" + variant.productFlavors.get(1).name + ".apk"
outputFileName = outputName
output.processManifest.doLast {
// set the composite code
String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml"
def manifestContent = file(manifestPath).getText()
manifestContent = manifestContent.replace('android:versionCode="1"',
String.format('android:versionCode="%s"', generatedCode))
file(manifestPath).write(manifestContent)
}
output.outputFileName = outputName
}
}
......@@ -204,7 +196,7 @@ task generateSources (type: Jar) {
}
dependencies {
def paging_version = "1.0.0"
def paging_version = "1.0.1"
implementation project(':libvlc')
implementation project(':medialibrary')
implementation project(':api')
......@@ -221,7 +213,6 @@ dependencies {
implementation "com.android.support:support-tv-provider:$rootProject.ext.appCompatVersion"
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt "com.android.databinding:compiler:$rootProject.ext.android_plugin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.ext.kotlinx_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.ext.kotlinx_version"
implementation "android.arch.lifecycle:extensions:$rootProject.ext.archVersion"
......
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