1
+ apply from : ' ../gitutils.gradle'
1
2
apply plugin : ' com.android.application'
2
- apply plugin : ' me.tatarka.retrolambda'
3
+ apply plugin : ' kotlin-android'
4
+ apply plugin : ' kotlin-kapt'
3
5
apply plugin : ' jacoco-android'
4
6
apply from : ' quality.gradle'
5
7
apply plugin : ' com.getkeepsafe.dexcount'
6
8
7
9
dependencies {
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' ){
20
22
transitive= true
21
23
}
22
24
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} "
26
25
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} "
28
29
29
- compile " com.jakewharton:butterknife:$BUTTERKNIFE_VERSION "
30
- annotationProcessor " com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION "
30
+ implementation " com.android.support:cardview-v7:${ project.supportLibVersion} "
31
31
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 "
34
34
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'
36
39
// Because RxAndroid releases are few and far between, it is recommended you also
37
40
// 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 "
56
55
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 "
60
58
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'
63
73
annotationProcessor ' com.google.dagger:dagger-compiler:2.11'
64
74
annotationProcessor ' com.google.dagger:dagger-android-processor:2.11'
65
75
}
@@ -74,22 +84,29 @@ android {
74
84
applicationId ' fr.free.nrw.commons'
75
85
versionCode 74
76
86
versionName ' 2.5.0'
87
+ setProperty(" archivesBaseName" , " app-commons-v$versionName -" + getBranchName())
77
88
minSdkVersion project. minSdkVersion
78
89
targetSdkVersion project. targetSdkVersion
79
90
testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
80
91
vectorDrawables. useSupportLibrary = true
81
92
}
82
93
94
+ sourceSets {
95
+ test. java. srcDirs + = ' src/test/kotlin'
96
+ }
97
+
83
98
buildTypes {
84
99
release {
85
100
minifyEnabled false // See https://stackoverflow.com/questions/40232404/google-play-apk-and-android-studio-apk-usb-debug-behaving-differently - proguard.cfg modification alone insufficient.
86
101
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.txt'
87
102
}
88
103
debug {
89
104
testCoverageEnabled true
105
+ versionNameSuffix " -debug-" + getBranchName() + " ~" + getBuildVersion()
90
106
}
91
107
}
92
108
109
+ flavorDimensions ' tier'
93
110
productFlavors {
94
111
prod {
95
112
buildConfigField " String" , " WIKIMEDIA_API_HOST" , " \" https://commons.wikimedia.org/w/api.php\" "
@@ -101,6 +118,7 @@ android {
101
118
buildConfigField " String" , " EVENTLOG_WIKI" , " \" commonswiki\" "
102
119
buildConfigField " String" , " SIGNUP_LANDING_URL" , " \" https://commons.m.wikimedia.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\" "
103
120
buildConfigField " String" , " SIGNUP_SUCCESS_REDIRECTION_URL" , " \" https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes\" "
121
+ dimension ' tier'
104
122
}
105
123
106
124
beta {
@@ -114,6 +132,7 @@ android {
114
132
buildConfigField " String" , " EVENTLOG_WIKI" , " \" commonswiki\" "
115
133
buildConfigField " String" , " SIGNUP_LANDING_URL" , " \" https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Special:CreateAccount&returnto=Main+Page&returntoquery=welcome%3Dyes\" "
116
134
buildConfigField " String" , " SIGNUP_SUCCESS_REDIRECTION_URL" , " \" https://commons.m.wikimedia.beta.wmflabs.org/w/index.php?title=Main_Page&welcome=yes\" "
135
+ dimension ' tier'
117
136
}
118
137
}
119
138
@@ -132,4 +151,5 @@ android {
132
151
configurations. all {
133
152
resolutionStrategy. force ' com.android.support:support-annotations:25.2.0'
134
153
}
154
+ buildToolsVersion buildToolsVersion
135
155
}
0 commit comments