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

AGP 3.0.0 migration

parent 650a1e84
...@@ -57,9 +57,9 @@ task javadocJar(type: Jar, dependsOn: javadoc) { ...@@ -57,9 +57,9 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
} }
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:$rootProject.ext.appCompatVersion" api "com.android.support:appcompat-v7:$rootProject.ext.appCompatVersion"
testCompile 'junit:junit:4.12' testApi 'junit:junit:4.12'
} }
def properties = new Properties() def properties = new Properties()
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
buildscript { buildscript {
repositories { repositories {
flatDir dirs: "gradle/plugins" flatDir dirs: "gradle/plugins"
google()
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
} }
...@@ -13,10 +14,7 @@ buildscript { ...@@ -13,10 +14,7 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
maven { google()
url 'https://maven.google.com'
// Alternative URL is 'https://dl.google.com/dl/android/maven2/'
}
jcenter() jcenter()
} }
} }
...@@ -24,7 +22,7 @@ allprojects { ...@@ -24,7 +22,7 @@ allprojects {
ext { ext {
appCompatVersion = '25.2.0' appCompatVersion = '25.2.0'
constraintLayoutVersion = '1.1.0-beta3' constraintLayoutVersion = '1.1.0-beta3'
buildToolsVersion = "26.0.1" buildToolsVersion = "27.0.2"
compileSdkVersion = 26 compileSdkVersion = 26
minSdkVersion = 9 minSdkVersion = 9
targetSdkVersion = 26 targetSdkVersion = 26
......
...@@ -2,5 +2,5 @@ apply plugin: 'java' ...@@ -2,5 +2,5 @@ apply plugin: 'java'
sourceCompatibility = 1.6 sourceCompatibility = 1.6
targetCompatibility = 1.6 targetCompatibility = 1.6
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
} }
\ No newline at end of file
...@@ -35,14 +35,13 @@ android { ...@@ -35,14 +35,13 @@ android {
manifestParser = new DefaultManifestParser(file('../vlc-android/AndroidManifest.xml')) manifestParser = new DefaultManifestParser(file('../vlc-android/AndroidManifest.xml'))
def androidVersion = manifestParser.getVersionName() def androidVersion = manifestParser.getVersionName()
//Custom APK name //Custom APK name
variant.outputs.each { output -> variant.outputs.all { output ->
def outputFile = output.outputFile if (outputFileName != null && outputFileName.endsWith('.aar')) {
if (outputFile != null && outputFile.name.endsWith('.aar')) { outputFileName = "libvlc-${vlcVersion}-${androidVersion}.aar"
def fileName = "libvlc-${vlcVersion}-${androidVersion}.aar"
output.outputFile = new File(outputFile.parent, fileName)
} }
} }
} }
buildToolsVersion '26.0.2'
} }
/* /*
...@@ -104,5 +103,5 @@ clean { ...@@ -104,5 +103,5 @@ clean {
} }
dependencies { dependencies {
compile "com.android.support:support-annotations:$rootProject.ext.appCompatVersion" api "com.android.support:support-annotations:$rootProject.ext.appCompatVersion"
} }
...@@ -50,6 +50,7 @@ android { ...@@ -50,6 +50,7 @@ android {
dataBinding { dataBinding {
enabled = true enabled = true
} }
buildToolsVersion '26.0.2'
} }
task generateSources (type: Jar) { task generateSources (type: Jar) {
...@@ -62,9 +63,9 @@ clean { ...@@ -62,9 +63,9 @@ clean {
} }
dependencies { dependencies {
compile project(':libvlc') implementation project(':libvlc')
compile "com.android.support:support-v4:$rootProject.ext.appCompatVersion" api "com.android.support:support-v4:$rootProject.ext.appCompatVersion"
compile "com.android.support:support-compat:$rootProject.ext.appCompatVersion" api "com.android.support:support-compat:$rootProject.ext.appCompatVersion"
compile "com.android.support:support-fragment:$rootProject.ext.appCompatVersion" api "com.android.support:support-fragment:$rootProject.ext.appCompatVersion"
testCompile 'junit:junit:4.12' testApi 'junit:junit:4.12'
} }
\ No newline at end of file
...@@ -107,6 +107,7 @@ android { ...@@ -107,6 +107,7 @@ android {
signedRelease { signedRelease {
initWith release initWith release
signingConfig = signingConfigs.release signingConfig = signingConfigs.release
matchingFallbacks = ['release']
} }
debug { debug {
applicationIdSuffix ".debug" applicationIdSuffix ".debug"
...@@ -155,12 +156,12 @@ android { ...@@ -155,12 +156,12 @@ android {
variant.mergedFlavor.versionCode = variant.productFlavors.get(0).versionCode * 10000000 + defaultConfig.versionCode + variant.productFlavors.get(1).versionCode variant.mergedFlavor.versionCode = variant.productFlavors.get(0).versionCode * 10000000 + defaultConfig.versionCode + variant.productFlavors.get(1).versionCode
//Custom APK name //Custom APK name
variant.outputs.each { output -> variant.outputs.all { output ->
def outputName = "VLC-Android-" def outputName = "VLC-Android-"
if (variant.productFlavors.get(0).name != "vanilla") if (variant.productFlavors.get(0).name != "vanilla")
outputName += variant.productFlavors.get(0).name.toUpperCase() + "-" outputName += variant.productFlavors.get(0).name.toUpperCase() + "-"
outputName += variant.versionName + "-" + variant.productFlavors.get(1).name + ".apk" outputName += variant.versionName + "-" + variant.productFlavors.get(1).name + ".apk"
output.outputFile = new File(output.outputFile.parentFile, outputName); outputFileName = outputName
} }
} }
...@@ -194,18 +195,18 @@ task generateSources (type: Jar) { ...@@ -194,18 +195,18 @@ task generateSources (type: Jar) {
} }
dependencies { dependencies {
compile project(':libvlc') implementation project(':libvlc')
compile project(':medialibrary') implementation project(':medialibrary')
compile project(':api') implementation project(':api')
compile project(':axmlrpc') implementation project(':axmlrpc')
compile "com.android.support:recyclerview-v7:$rootProject.ext.appCompatVersion" implementation "com.android.support:recyclerview-v7:$rootProject.ext.appCompatVersion"
compile "com.android.support:design:$rootProject.ext.appCompatVersion" implementation "com.android.support:design:$rootProject.ext.appCompatVersion"
compile "com.android.support:support-annotations:$rootProject.ext.appCompatVersion" implementation "com.android.support:support-annotations:$rootProject.ext.appCompatVersion"
compile "com.android.support:preference-v7:$rootProject.ext.appCompatVersion" implementation "com.android.support:preference-v7:$rootProject.ext.appCompatVersion"
compile "com.android.support:leanback-v17:$rootProject.ext.appCompatVersion" implementation "com.android.support:leanback-v17:$rootProject.ext.appCompatVersion"
compile "com.android.support:preference-leanback-v17:$rootProject.ext.appCompatVersion" implementation "com.android.support:preference-leanback-v17:$rootProject.ext.appCompatVersion"
compile "com.android.support.constraint:constraint-layout:$rootProject.ext.constraintLayoutVersion" implementation "com.android.support.constraint:constraint-layout:$rootProject.ext.constraintLayoutVersion"
testCompile 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
} }
static def buildTime() { static def buildTime() {
......
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