8000 Feature/update dependencies (#421) · rzoro/Android@63e4cd4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 63e4cd4

Browse files
authored
Feature/update dependencies (duckduckgo#421)
* Update gradle and AGP * Update dependencies; fix breaking change in WorkManager API) * Extract remainder of dependency versions for consistency * Update to latest alphas of constraintlayout, room and workManager
1 parent 875b402 commit 63e4cd4

File tree

4 files changed

+28
-22
lines changed

4 files changed

+28
-22
lines changed

app/build.gradle

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,22 @@ android {
7777
}
7878

7979
ext {
80-
androidX = "1.0.1"
81-
materialDesign = "1.1.0-alpha01"
80+
androidX = "1.0.2"
81+
materialDesign = "1.1.0-alpha02"
8282
architectureComponents = "1.1.1"
8383
architectureComponentsExtensions = "1.1.1"
8484
androidKtx = "1.0.1"
85-
androidTestRunner = "1.0.2"
86-
constraintLayout = "2.0.0-alpha2"
85+
constraintLayout = "2.0.0-alpha3"
8786
lifecycle = "2.0.0"
88-
room = "2.1.0-alpha02"
89-
workManager = "1.0.0-alpha11"
87+
room = "2.1.0-alpha04"
88+
workManager = "1.0.0-beta03"
89+
legacySupport = "1.0.0"
90+
espressoCore = "3.1.1"
91+
coreTesting = "2.0.0"
92+
androidTestRunner = "1.0.2"
93+
testRunner = "1.1.1"
9094

95+
junit = "4.12"
9196
dagger = "2.18"
9297
retrofit = "2.3.0"
9398
ankoVersion = "0.10.4"
@@ -101,11 +106,12 @@ ext {
101106
leakCanary = "1.6.2"
102107
mockito = "2.18.3"
103108
mockitoKotlin = "2.0.0"
109+
commonsMath = "3.6.1"
104110
}
105111

106112

107113
dependencies {
108-
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
114+
implementation "androidx.legacy:legacy-support-v4:$legacySupport"
109115
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanary"
110116
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanary"
111117

@@ -137,8 +143,8 @@ dependencies {
137143
// ViewModel and LiveData
138144
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle"
139145
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle"
140-
testImplementation "androidx.arch.core:core-testing:$lifecycle"
141-
androidTestImplementation "androidx.arch.core:core-testing:$lifecycle"
146+
testImplementation "androidx.arch.core:core-testing:$coreTesting"
147+
androidTestImplementation "androidx.arch.core:core-testing:$coreTesting"
142148

143149
// Room
144150
implementation "androidx.room:room-runtime:$room"
@@ -163,16 +169,16 @@ dependencies {
163169
implementation "com.airbnb.android:lottie:$lottieVersion"
164170

165171
// Apache commons
166-
implementation "org.apache.commons:commons-math3:3.6.1"
172+
implementation "org.apache.commons:commons-math3:$commonsMath"
167173

168174
testImplementation "org.mockito:mockito-core:$mockito"
169175
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$mockitoKotlin"
170-
testImplementation "junit:junit:4.12"
176+
testImplementation "junit:junit:$junit"
171177

172-
androidTestImplementation 'androidx.test:runner:1.1.0'
173-
androidTestImplementation 'androidx.test:rules:1.1.0'
174-
androidTestUtil "androidx.test:orchestrator:1.1.0"
175-
androidTestImplementation "androidx.test.espresso:espresso-core:3.1.0"
178+
androidTestImplementation "androidx.test:runner:$testRunner"
179+
androidTestImplementation "androidx.test:rules:$testRunner"
180+
androidTestUtil "androidx.test:orchestrator:$testRunner"
181+
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCore"
176182
androidTestImplementation "org.mockito:mockito-android:$mockito"
177183
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$okHttp"
178184
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$mockitoKotlin"

app/src/main/java/com/duckduckgo/app/fire/DataClearingWorker.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package com.duckduckgo.app.fire
1919
import android.content.Context
2020
import androidx.annotation.WorkerThread
2121
import androidx.work.CoroutineWorker
22-
import androidx.work.ListenableWorker.Result.SUCCESS
22+
import androidx.work.ListenableWorker.Result.success
2323
import androidx.work.WorkerParameters
2424
import com.duckduckgo.app.global.view.ClearDataAction
2525
import com.duckduckgo.app.settings.clear.ClearWhatOption
@@ -36,19 +36,19 @@ class DataClearingWorker(context: Context, workerParams: WorkerParameters) : Cor
3636
lateinit var clearDataAction: ClearDataAction
3737

3838
@WorkerThread
39-
override suspend fun doWork(): Payload {
39+
override suspend fun doWork(): Result {
4040

4141
if (jobAlreadyExecuted()) {
4242
Timber.i("This job has run before; no more work needed")
43-
return Payload(SUCCESS)
43+
return success()
4444
}
4545

4646
settingsDataStore.lastExecutedJobId = id.toString()
4747

4848
clearData(settingsDataStore.automaticallyClearWhatOption)
4949

5050
Timber.i("Clear data job finished; returning SUCCESS")
51-
return Payload(SUCCESS)
51+
return success()
5252
}
5353

5454
/**

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
jcenter()
1010
}
1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.2.1'
12+
classpath 'com.android.tools.build:gradle:3.3.0'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
classpath "com.android.tools.build.jetifier:jetifier-processor:$jetifier"
1515

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jun 15 10:32:19 BST 2018
1+
#Fri Jan 18 10:05:44 GMT 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

0 commit comments

Comments
 (0)
0