1+ apply from : ' ../gitutils.gradle'
12apply plugin : ' com.android.application'
2- apply plugin : ' me.tatarka.retrolambda'
3+ apply plugin : ' kotlin-android'
4+ apply plugin : ' kotlin-kapt'
35apply plugin : ' jacoco-android'
46apply from : ' quality.gradle'
57apply plugin : ' com.getkeepsafe.dexcount'
68
79dependencies {
8- compile ' com.github.nicolas-raoul:Quadtree:ac16ea8035bf07'
9- compile ' fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
10- compile ' in.yuvi:http.fluent:1.3'
11- compile ' com.android.volley:volley:1.0.0'
12- compile ' ch.acra:acra:4.7.0'
13- compile ' org.mediawiki:api:1.3'
14- compile ' commons-codec:commons-codec:1.10'
15- compile ' com.github.pedrovgs:renderers:3.3.3'
16- compile ' com.google.code.gson:gson:2.8.1'
17- compile ' com.jakewharton.timber:timber:4.5.1'
18- compile ' info.debatty:java-string-similarity:0.24'
19- compile (' com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.0@aar' ){
10+ implementation ' com.github.nicolas-raoul:Quadtree:ac16ea8035bf07'
11+ implementation ' fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
12+ implementation ' in.yuvi:http.fluent:1.3'
13+ implementation ' com.android.volley:volley:1.0.0'
14+ implementation ' ch.acra:acra:4.7.0'
15+ implementation ' org.mediawiki:api:1.3'
16+ implementation ' commons-codec:commons-codec:1.10'
17+ implementation ' com.github.pedrovgs:renderers:3.3.3'
18+ implementation ' com.google.code.gson:gson:2.8.1'
19+ implementation ' com.jakewharton.timber:timber:4.5.1'
20+ implementation ' info.debatty:java-string-similarity:0.24'
21+ implementation (' com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.0@aar' ){
2022 transitive= true
2123 }
2224
23- compile " com.android.support:support-v4:${ project.supportLibVersion} "
24- compile " com.android.support:appcompat-v7:${ project.supportLibVersion} "
25- compile " com.android.support:design:${ project.supportLibVersion} "
2625
27- compile " com.android.support:cardview-v7:${ project.supportLibVersion} "
26+ implementation " com.android.support:support-v4:${ project.supportLibVersion} "
27+ implementation " com.android.support:appcompat-v7:${ project.supportLibVersion} "
28+ implementation " com.android.support:design:${ project.supportLibVersion} "
2829
29- compile " com.jakewharton:butterknife:$BUTTERKNIFE_VERSION "
30- annotationProcessor " com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION "
30+ implementation " com.android.support:cardview-v7:${ project.supportLibVersion} "
3131
32- compile ' com.squareup.okhttp3:okhttp:3.8.1 '
33- compile ' com.squareup.okio:okio:1.13.0 '
32+ implementation " com.jakewharton:butterknife: $B UTTERKNIFE_VERSION "
33+ kapt " com.jakewharton:butterknife-compiler: $B UTTERKNIFE_VERSION "
3434
35- compile ' io.reactivex.rxjava2:rxandroid:2.0.1'
35+ implementation ' com.squareup.okhttp3:okhttp:3.8.1'
36+ implementation ' com.squareup.okio:okio:1.13.0'
37+
38+ implementation ' io.reactivex.rxjava2:rxandroid:2.0.1'
3639 // Because RxAndroid releases are few and far between, it is recommended you also
3740 // explicitly depend on RxJava's latest version for bug fixes and new features.
38- compile ' io.reactivex.rxjava2:rxjava:2.1.2'
39- compile ' com.jakewharton.rxbinding2:rxbinding:2.0.0'
40- compile ' com.jakewharton.rxbinding2:rxbinding-support-v4:2.0.0'
41- compile ' com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.0.0'
42- compile ' com.jakewharton.rxbinding2:rxbinding-design:2.0.0'
43-
44- compile ' com.facebook.fresco:fresco:1.3.0'
45- compile ' com.facebook.stetho:stetho:1.5.0'
46-
47- testCompile ' junit:junit:4.12'
48- testCompile ' org.robolectric:robolectric:3.4'
49-
50- testCompile ' com.squareup.okhttp3:mockwebserver:3.8.1'
51- androidTestCompile ' com.squareup.okhttp3:mockwebserver:3.8.1'
52- androidTestCompile " com.android.support:support-annotations:${ project.supportLibVersion} "
53- androidTestCompile (' com.android.support.test.espresso:espresso-core:3.0.1' ){
54- exclude group : ' com.google.code.findbugs'
55- }
41+ implementation ' io.reactivex.rxjava2:rxjava:2.1.2'
42+ implementation ' com.jakewharton.rxbinding2:rxbinding:2.0.0'
43+ implementation ' com.jakewharton.rxbinding2:rxbinding-support-v4:2.0.0'
44+ implementation ' com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.0.0'
45+ implementation ' com.jakewharton.rxbinding2:rxbinding-design:2.0.0'
46+
47+ implementation ' com.facebook.fresco:fresco:1.3.0'
48+ implementation ' com.facebook.stetho:stetho:1.5.0'
49+
50+ implementation " com.google.dagger:dagger:$DAGGER_VERSION "
51+ implementation " com.google.dagger:dagger-android-support:$DAGGER_VERSION "
52+
53+ kapt " com.google.dagger:dagger-android-processor:$DAGGER_VERSION "
54+ kapt " com.google.dagger:dagger-compiler:$DAGGER_VERSION "
5655
57- debugCompile ' com.squareup.leakcanary:leakcanary-android:1.5.1'
58- releaseCompile ' com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
59- testCompile ' com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
56+ testImplementation " org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version "
57+ androidTestImplementation " org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version "
6058
61- compile ' com.google.dagger:dagger:2.11'
62- compile ' com.google.dagger:dagger-android-support:2.11'
59+ testImplementation ' junit:junit:4.12'
60+ testImplementation ' org.robolectric:robolectric:3.4'
61+
62+ testImplementation ' com.squareup.okhttp3:mockwebserver:3.8.1'
63+ androidTestImplementation ' com.squareup.okhttp3:mockwebserver:3.8.1'
64+ androidTestImplementation " com.android.support:support-annotations:${ project.supportLibVersion} "
65+ androidTestImplementation ' com.android.support.test.espresso:espresso-core:3.0.1'
66+
67+ debugImplementation ' com.squareup.leakcanary:leakcanary-android:1.5.1'
68+ releaseImplementation ' com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
69+ testImplementation ' com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
70+
71+ implementation ' com.google.dagger:dagger:2.11'
72+ implementation ' com.google.dagger:dagger-android-support:2.11'
6373 annotationProcessor ' com.google.dagger:dagger-compiler:2.11'
6474 annotationProcessor ' com.google.dagger:dagger-android-processor:2.11'
6575}
@@ -74,22 +84,29 @@ android {
7484 applicationId ' fr.free.nrw.commons'
7585 versionCode 74
7686 versionName ' 2.5.0'
87+ setProperty(" archivesBaseName" , " app-commons-v$versionName -" + getBranchName())
7788 minSdkVersion project. minSdkVersion
7889 targetSdkVersion project. targetSdkVersion
7990 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
8091 vectorDrawables. useSupportLibrary = true
8192 }
8293
94+ sourceSets {
95+ test. java. srcDirs + = ' src/test/kotlin'
96+ }
97+
8398 buildTypes {
8499 release {
85100 minifyEnabled false // See https://stackoverflow.com/questions/40232404/google-play-apk-and-android-studio-apk-usb-debug-behaving-differently - proguard.cfg modification alone insufficient.
86101 proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.txt'
87102 }
88103 debug {
89104 testCoverageEnabled true
105+ versionNameSuffix " -debug-" + getBranchName() + " ~" + getBuildVersion()
90106 }
91107 }
92108
109+ flavorDimensions ' tier'
93110 productFlavors {
94111 prod {
95112 buildConfigField " String" , " WIKIMEDIA_API_HOST" , " \" https://commons.wikimedia.org/w/api.php\" "
@@ -101,6 +118,7 @@ android {
101118 buildConfigField " String" , " EVENTLOG_WIKI" , " \" commonswiki\" "
102119 buildConfigField " String" , " SIGNUP_LANDING_URL" , " \" https://commons.m.wikimedia.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\" "
103120 buildConfigField " String" , " SIGNUP_SUCCESS_REDIRECTION_URL" , " \" https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes\" "
121+ dimension ' tier'
104122 }
105123
106124 beta {
@@ -114,6 +132,7 @@ android {
114132 buildConfigField " String" , " EVENTLOG_WIKI" , " \" commonswiki\" "
115133 buildConfigField " String" , " SIGNUP_LANDING_URL" , " \" https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\" "
116134 buildConfigField " String" , " SIGNUP_SUCCESS_REDIRECTION_URL" , " \" https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Main_Page&welcome=yes\" "
135+ dimension ' tier'
117136 }
118137 }
119138
@@ -132,4 +151,5 @@ android {
132151 configurations. all {
133152 resolutionStrategy. force ' com.android.support:support-annotations:25.2.0'
134153 }
154+ buildToolsVersion buildToolsVersion
135155}
0 commit comments