From 3adb5d83aec1215bbbb2ff7ec61d96652ff55cc6 Mon Sep 17 00:00:00 2001 From: maskara Date: Thu, 2 Nov 2017 02:57:09 +0530 Subject: [PATCH] Update Gradle plugin to 3.0 --- .travis.yml | 2 +- app/build.gradle | 71 ++++++++++++------------ build.gradle | 2 + gradle.properties | 4 +- gradle/wrapper/gradle-wrapper.properties | 3 +- 5 files changed, 44 insertions(+), 38 deletions(-) diff --git a/.travis.yml b/.travis.yml index aaf3ab7f9..74eecbaf5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ android: components: - tools - platform-tools - - build-tools-26.0.1 + - build-tools-26.0.2 - extra-google-m2repository - extra-android-m2repository - ${ANDROID_TARGET} diff --git a/app/build.gradle b/app/build.gradle index 9baaed622..2ead26256 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,56 +1,55 @@ apply plugin: 'com.android.application' -apply plugin: 'me.tatarka.retrolambda' apply plugin: 'jacoco-android' apply from: 'quality.gradle' apply plugin: 'com.getkeepsafe.dexcount' dependencies { - compile 'com.github.nicolas-raoul:Quadtree:ac16ea8035bf07' - compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar' - compile 'in.yuvi:http.fluent:1.3' - compile 'com.android.volley:volley:1.0.0' - compile 'ch.acra:acra:4.7.0' - compile 'org.mediawiki:api:1.3' - compile 'commons-codec:commons-codec:1.10' - compile 'com.github.pedrovgs:renderers:3.3.3' - compile 'com.google.code.gson:gson:2.8.1' - compile 'com.jakewharton.timber:timber:4.5.1' - compile 'info.debatty:java-string-similarity:0.24' - compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.0@aar'){ + implementation 'com.github.nicolas-raoul:Quadtree:ac16ea8035bf07' + implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar' + implementation 'in.yuvi:http.fluent:1.3' + implementation 'com.android.volley:volley:1.0.0' + implementation 'ch.acra:acra:4.7.0' + implementation 'org.mediawiki:api:1.3' + implementation 'commons-codec:commons-codec:1.10' + implementation 'com.github.pedrovgs:renderers:3.3.3' + implementation 'com.google.code.gson:gson:2.8.1' + implementation 'com.jakewharton.timber:timber:4.5.1' + implementation 'info.debatty:java-string-similarity:0.24' + implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.0@aar'){ transitive=true } - compile "com.android.support:support-v4:${project.supportLibVersion}" - compile "com.android.support:appcompat-v7:${project.supportLibVersion}" - compile "com.android.support:design:${project.supportLibVersion}" + implementation "com.android.support:support-v4:${project.supportLibVersion}" + implementation "com.android.support:appcompat-v7:${project.supportLibVersion}" + implementation "com.android.support:design:${project.supportLibVersion}" - compile "com.android.support:cardview-v7:${project.supportLibVersion}" + implementation "com.android.support:cardview-v7:${project.supportLibVersion}" - compile "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION" + implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION" annotationProcessor "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION" - compile 'com.squareup.okhttp3:okhttp:3.8.1' - compile 'com.squareup.okio:okio:1.13.0' + implementation 'com.squareup.okhttp3:okhttp:3.8.1' + implementation 'com.squareup.okio:okio:1.13.0' - compile 'io.reactivex.rxjava2:rxandroid:2.0.1' + implementation 'io.reactivex.rxjava2:rxandroid:2.0.1' // Because RxAndroid releases are few and far between, it is recommended you also // explicitly depend on RxJava's latest version for bug fixes and new features. - compile 'io.reactivex.rxjava2:rxjava:2.1.2' - compile 'com.jakewharton.rxbinding2:rxbinding:2.0.0' - compile 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.0.0' - compile 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.0.0' - compile 'com.jakewharton.rxbinding2:rxbinding-design:2.0.0' + implementation 'io.reactivex.rxjava2:rxjava:2.1.2' + implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0' + implementation 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.0.0' + implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.0.0' + implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.0.0' - compile 'com.facebook.fresco:fresco:1.3.0' - compile 'com.facebook.stetho:stetho:1.5.0' + implementation 'com.facebook.fresco:fresco:1.3.0' + implementation 'com.facebook.stetho:stetho:1.5.0' - testCompile 'junit:junit:4.12' - testCompile 'org.robolectric:robolectric:3.4' + testImplementation 'junit:junit:4.12' + testImplementation 'org.robolectric:robolectric:3.4' - testCompile 'com.squareup.okhttp3:mockwebserver:3.8.1' - androidTestCompile 'com.squareup.okhttp3:mockwebserver:3.8.1' - androidTestCompile "com.android.support:support-annotations:${project.supportLibVersion}" - androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1' + testImplementation 'com.squareup.okhttp3:mockwebserver:3.8.1' + androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.8.1' + androidTestImplementation "com.android.support:support-annotations:${project.supportLibVersion}" + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' @@ -83,6 +82,7 @@ android { } } + flavorDimensions 'tier' productFlavors { prod { buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.org/w/api.php\"" @@ -94,6 +94,7 @@ android { buildConfigField "String", "EVENTLOG_WIKI", "\"commonswiki\"" buildConfigField "String", "SIGNUP_LANDING_URL", "\"https://commons.m.wikimedia.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\"" buildConfigField "String", "SIGNUP_SUCCESS_REDIRECTION_URL", "\"https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes\"" + dimension 'tier' } beta { @@ -107,6 +108,7 @@ android { buildConfigField "String", "EVENTLOG_WIKI", "\"commonswiki\"" buildConfigField "String", "SIGNUP_LANDING_URL", "\"https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\"" buildConfigField "String", "SIGNUP_SUCCESS_REDIRECTION_URL", "\"https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Main_Page&welcome=yes\"" + dimension 'tier' } } @@ -125,4 +127,5 @@ android { configurations.all { resolutionStrategy.force 'com.android.support:support-annotations:25.2.0' } + buildToolsVersion buildToolsVersion } diff --git a/build.gradle b/build.gradle index 70023d85f..732be0d6e 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ buildscript { repositories { jcenter() mavenCentral() + google() } dependencies { classpath "com.android.tools.build:gradle:${project.gradleVersion}" @@ -17,5 +18,6 @@ allprojects { jcenter() maven { url "https://jitpack.io" } maven { url "https://maven.google.com" } + google() } } diff --git a/gradle.properties b/gradle.properties index 4b643d02b..23aa8088f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,9 @@ -gradleVersion = 2.3.3 +gradleVersion = 3.0.0 supportLibVersion = 26.1.0 compileSdkVersion = android-26 -buildToolsVersion = 26.0.1 +buildToolsVersion = 26.0.2 minSdkVersion = 15 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4dde7c991..e9e3a344e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Thu Nov 02 02:18:35 IST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip