@@ -11,19 +11,17 @@ apply from: 'quality.gradle'
11
11
12
12
def isRunningOnTravisAndIsNotPRBuild = System . getenv(" CI" ) == " true" && file(' ../play.p12' ). exists()
13
13
14
- if (isRunningOnTravisAndIsNotPRBuild) {
14
+ if (isRunningOnTravisAndIsNotPRBuild) {
15
15
apply plugin : ' com.github.triplet.play'
16
16
}
17
17
18
18
dependencies {
19
19
20
- implementation project(' :wikimedia-data-client' )
21
20
// Utils
21
+ implementation ' com.github.nicolas-raoul:Quadtree:ac16ea8035bf07'
22
22
implementation ' in.yuvi:http.fluent:1.3'
23
23
implementation ' com.google.code.gson:gson:2.8.5'
24
- implementation (" com.squareup.okhttp3:okhttp:$OKHTTP_VERSION " ){
25
- force = true // API 19 support
26
- }
24
+ implementation ' com.squareup.okhttp3:okhttp:4.2.0'
27
25
implementation ' com.squareup.okio:okio:2.2.2'
28
26
implementation ' io.reactivex.rxjava2:rxandroid:2.1.0'
29
27
implementation ' io.reactivex.rxjava2:rxjava:2.2.3'
@@ -33,6 +31,7 @@ dependencies {
33
31
implementation ' com.jakewharton.rxbinding2:rxbinding-design:2.1.1'
34
32
implementation ' com.facebook.fresco:fresco:1.13.0'
35
33
implementation ' org.apache.commons:commons-lang3:3.8.1'
34
+ implementation ' com.github.maskaravivek:wikimedia-android-data-client:v0.0.30'
36
35
37
36
// UI
38
37
implementation ' fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
@@ -45,16 +44,7 @@ dependencies {
45
44
implementation ' com.dinuscxj:circleprogressbar:1.1.1'
46
45
implementation ' com.karumi:dexter:5.0.0'
47
46
implementation " com.jakewharton:butterknife:$BUTTERKNIFE_VERSION "
48
- implementation ' androidx.lifecycle:lifecycle-extensions:2.2.0'
49
-
50
47
kapt " com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION "
51
- implementation " com.hannesdorfmann:adapterdelegates4-kotlin-dsl-layoutcontainer:$ADAPTER_DELEGATES_VERSION "
52
- implementation " com.hannesdorfmann:adapterdelegates4-pagination:$ADAPTER_DELEGATES_VERSION "
53
- implementation " androidx.paging:paging-runtime-ktx:$PAGING_VERSION "
54
- testImplementation " androidx.paging:paging-common-ktx:$PAGING_VERSION "
55
- implementation " androidx.paging:paging-rxjava2-ktx:$PAGING_VERSION "
56
- implementation " androidx.recyclerview:recyclerview:1.2.0-alpha02"
57
- implementation " com.squareup.okhttp3:okhttp-ws:$OKHTTP_VERSION "
58
48
59
49
// Logging
60
50
implementation ' ch.acra:acra-dialog:5.3.0'
@@ -63,7 +53,7 @@ dependencies {
63
53
api(' com.github.tony19:logback-android-classic:1.1.1-6' ) {
64
54
exclude group : ' com.google.android' , module : ' android'
65
55
}
66
- implementation " com.squareup.okhttp3:logging-interceptor:$O KHTTP_VERSION "
56
+ implementation " com.squareup.okhttp3:logging-interceptor:4.2.0 "
67
57
68
58
// Dependency injector
69
59
implementation " com.google.dagger:dagger-android-support:$DAGGER_VERSION "
@@ -75,21 +65,19 @@ dependencies {
75
65
76
66
// Mocking
77
67
testImplementation ' com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0'
78
- testImplementation ' org.mockito:mockito-inline:2.13.0 '
68
+ testImplementation ' org.mockito:mockito-inline:2.8.47 '
79
69
testImplementation ' org.mockito:mockito-core:2.23.0'
80
70
testImplementation " org.powermock:powermock-module-junit4:2.0.0-beta.5"
81
71
testImplementation " org.powermock:powermock-api-mockito2:2.0.0-beta.5"
82
72
83
73
// Unit testing
84
- testImplementation ' junit:junit:4.13 '
74
+ testImplementation ' junit:junit:4.12 '
85
75
testImplementation ' org.robolectric:robolectric:4.3'
86
76
testImplementation ' androidx.test:core:1.2.0'
87
- testImplementation " com.squareup.okhttp3:mockwebserver:$O KHTTP_VERSION "
77
+ testImplementation ' com.squareup.okhttp3:mockwebserver:3.12.1 '
88
78
testImplementation " org.powermock:powermock-module-junit4:2.0.0-beta.5"
89
79
testImplementation " org.powermock:powermock-api-mockito2:2.0.0-beta.5"
90
80
testImplementation ' org.mockito:mockito-core:2.23.0'
91
- testImplementation " com.jraska.livedata:testing-ktx:1.1.2"
92
- testImplementation " androidx.arch.core:core-testing:2.1.0"
93
81
94
82
// Android testing
95
83
androidTestImplementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION "
@@ -99,7 +87,7 @@ dependencies {
99
87
androidTestImplementation ' androidx.test:runner:1.2.0'
100
88
androidTestImplementation ' androidx.test:rules:1.2.0'
101
89
androidTestImplementation ' androidx.annotation:annotation:1.1.0'
102
- androidTestImplementation ' com.squareup.okhttp3:mockwebserver:4.8.0 '
90
+ androidTestImplementation ' com.squareup.okhttp3:mockwebserver:3.12.1 '
103
91
androidTestUtil ' androidx.test:orchestrator:1.2.0'
104
92
105
93
// Debugging
@@ -113,49 +101,43 @@ dependencies {
113
101
implementation " androidx.cardview:cardview:1.0.0"
114
102
implementation ' androidx.constraintlayout:constraintlayout:1.1.3'
115
103
implementation " androidx.exifinterface:exifinterface:1.0.0"
116
- implementation " androidx.core:core-ktx:$CORE_KTX_VERSION "
117
- implementation " androidx.multidex:multidex:2.0.1"
118
104
119
105
// swipe_layout
120
106
implementation ' com.daimajia.swipelayout:library:1.2.0@aar'
121
107
122
108
// Room
123
109
implementation " androidx.room:room-runtime:$ROOM_VERSION "
124
- implementation " androidx.room:room-ktx:$ROOM_VERSION "
110
+ kapt " androidx.room:room-compiler:$ROOM_VERSION " // For Kotlin use kapt instead of annotationProcessor
111
+ implementation ' com.squareup.retrofit2:retrofit:2.7.1'
125
112
implementation " androidx.room:room-rxjava2:$ROOM_VERSION "
126
- kapt " androidx.room:room-compiler:$ROOM_VERSION "
127
- // For Kotlin use kapt instead of annotationProcessor
128
- implementation ' com.squareup.retrofit2:retrofit:2.8.1'
129
113
testImplementation " androidx.arch.core:core-testing:2.1.0"
130
114
131
115
// Pref
132
116
// Java language implementation
133
117
implementation " androidx.preference:preference:$PREFERENCE_VERSION "
134
118
// Kotlin
135
119
implementation " androidx.preference:preference-ktx:$PREFERENCE_VERSION "
136
-
137
- implementation " androidx.multidex:multidex:$MULTIDEX_VERSION "
138
120
}
139
121
140
122
android {
141
123
compileSdkVersion 28
124
+ buildToolsVersion " 28.0.3"
142
125
143
126
defaultConfig {
144
127
// applicationId 'fr.free.nrw.commons'
145
- versionCode 775
146
- versionName ' 2.13.1 '
128
+ versionCode 709
129
+ versionName ' 2.13'
147
130
setProperty(" archivesBaseName" , " app-commons-v$versionName -" + getBranchName())
148
131
149
132
minSdkVersion 19
150
133
targetSdkVersion 28
151
134
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
152
135
testInstrumentationRunnerArguments clearPackageData : ' true'
153
136
154
- multiDexEnabled true
155
-
156
137
testOptions {
157
138
execution ' ANDROIDX_TEST_ORCHESTRATOR'
158
139
}
140
+
159
141
vectorDrawables. useSupportLibrary = true
160
142
}
161
143
@@ -182,7 +164,7 @@ android {
182
164
test. resources. srcDirs + = ' src/main/resoures'
183
165
}
184
166
185
- signingConfigs {
167
+ signingConfigs {
186
168
release
187
169
}
188
170
@@ -191,7 +173,7 @@ android {
191
173
minifyEnabled true
192
174
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.txt'
193
175
testProguardFile ' test-proguard-rules.txt'
194
- if (isRunningOnTravisAndIsNotPRBuild) {
176
+ if (isRunningOnTravisAndIsNotPRBuild) {
195
177
signingConfig signingConfigs. release
196
178
}
197
179
}
@@ -214,18 +196,17 @@ android {
214
196
215
197
configurations. all {
216
198
resolutionStrategy. force ' androidx.annotation:annotation:1.0.2'
217
- exclude module : ' okhttp-ws'
218
199
}
200
+
219
201
flavorDimensions ' tier'
220
202
productFlavors {
221
203
prod {
222
204
223
- applicationId ' fr.free.nrw.commons'
205
+ applicationId ' fr.free.nrw.commons'
224
206
225
207
buildConfigField " String" , " WIKIMEDIA_API_POTD" , " \" https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\" "
226
208
buildConfigField " String" , " WIKIMEDIA_API_HOST" , " \" https://commons.wikimedia.org/w/api.php\" "
227
209
buildConfigField " String" , " WIKIDATA_API_HOST" , " \" https://www.wikidata.org/w/api.php\" "
228
- buildConfigField " String" , " WIKIDATA_URL" , " \" https://www.wikidata.org\" "
229
210
buildConfigField " String" , " WIKIMEDIA_FORGE_API_HOST" , " \" https://tools.wmflabs.org/\" "
230
211
buildConfigField " String" , " WIKIMEDIA_CAMPAIGNS_URL" , " \" https://raw.githubusercontent.com/commons-app/campaigns/master/campaigns.json\" "
231
212
buildConfigField " String" , " IMAGE_URL_BASE" , " \" https://upload.wikimedia.org/wikipedia/commons\" "
@@ -247,7 +228,6 @@ android {
247
228
buildConfigField " String" , " COMMIT_SHA" , " \" " + getBuildVersion(). toString() + " \" "
248
229
buildConfigField " String" , " TEST_USERNAME" , " \" " + System . getenv(" test_user_name" ) + " \" "
249
230
buildConfigField " String" , " TEST_PASSWORD" , " \" " + System . getenv(" test_user_password" ) + " \" "
250
- buildConfigField " String" , " DEPICTS_PROPERTY" , " \" P180\" "
251
231
252
232
dimension ' tier'
253
233
}
@@ -259,7 +239,6 @@ android {
259
239
buildConfigField " String" , " WIKIMEDIA_API_POTD" , " \" https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\" "
260
240
buildConfigField " String" , " WIKIMEDIA_API_HOST" , " \" https://commons.wikimedia.beta.wmflabs.org/w/api.php\" "
261
241
buildConfigField " String" , " WIKIDATA_API_HOST" , " \" https://www.wikidata.org/w/api.php\" "
262
- buildConfigField " String" , " WIKIDATA_URL" , " \" https://www.wikidata.org\" "
263
242
buildConfigField " String" , " WIKIMEDIA_FORGE_API_HOST" , " \" https://tools.wmflabs.org/\" "
264
243
buildConfigField " String" , " WIKIMEDIA_CAMPAIGNS_URL" , " \" https://raw.githubusercontent.com/commons-app/campaigns/master/campaigns_beta_active.json\" "
265
244
buildConfigField " String" , " IMAGE_URL_BASE" , " \" https://upload.beta.wmflabs.org/wikipedia/commons\" "
@@ -281,7 +260,6 @@ android {
281
260
buildConfigField " String" , " COMMIT_SHA" , " \" " + getBuildVersion(). toString() + " \" "
282
261
buildConfigField " String" , " TEST_USERNAME" , " \" " + System . getenv(" test_user_name" ) + " \" "
283
262
buildConfigField " String" , " TEST_PASSWORD" , " \" " + System . getenv(" test_user_password" ) + " \" "
284
- buildConfigField " String" , " DEPICTS_PROPERTY" , " \" P245962\" "
285
263
286
264
dimension ' tier'
287
265
}
@@ -301,7 +279,7 @@ android {
301
279
buildToolsVersion buildToolsVersion
302
280
}
303
281
304
- if (isRunningOnTravisAndIsNotPRBuild) {
282
+ if (isRunningOnTravisAndIsNotPRBuild) {
305
283
play {
306
284
track = " alpha"
307
285
userFraction = 1
0 commit comments