From b1d716711231a3b025c93d95103013948d81e91b Mon Sep 17 00:00:00 2001 From: len Date: Wed, 15 Jun 2016 13:18:27 +0200 Subject: [PATCH] Bump dependencies --- app/build.gradle | 22 ++++++------------- .../data/library/LibraryUpdateAlarmTest.kt | 16 +++----------- .../data/library/LibraryUpdateServiceTest.kt | 8 +------ gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 12 insertions(+), 36 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7cebfa087d..4431d11dd1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,9 +78,6 @@ android { main.java.srcDirs += 'src/main/kotlin' } - // http://stackoverflow.com/questions/32759529/androidhttpclient-not-found-when-running-robolectric - useLibrary 'org.apache.http.legacy' - } dependencies { @@ -104,13 +101,13 @@ dependencies { // ReactiveX compile 'io.reactivex:rxandroid:1.2.0' compile 'io.reactivex:rxjava:1.1.5' - compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.1' + compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2' // Network client compile "com.squareup.okhttp3:okhttp:3.3.1" // REST - final retrofit_version = '2.0.2' + final retrofit_version = '2.1.0' compile "com.squareup.retrofit2:retrofit:$retrofit_version" compile "com.squareup.retrofit2:converter-gson:$retrofit_version" compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version" @@ -119,8 +116,8 @@ dependencies { compile 'com.squareup.okio:okio:1.8.0' // JSON - compile 'com.google.code.gson:gson:2.6.2' - compile 'com.github.salomonbrys.kotson:kotson:2.2.1' + compile 'com.google.code.gson:gson:2.7' + compile 'com.github.salomonbrys.kotson:kotson:2.2.2' // YAML compile 'org.yaml:snakeyaml:1.17' @@ -138,9 +135,7 @@ dependencies { compile 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0' // Database - final storio_version = '1.8.0' - compile "com.pushtorefresh.storio:sqlite:$storio_version" - compile "com.pushtorefresh.storio:sqlite-annotations:$storio_version" + compile "com.pushtorefresh.storio:sqlite:1.9.0" // Model View Presenter final nucleus_version = '3.0.0' @@ -171,11 +166,8 @@ dependencies { // Tests testCompile 'junit:junit:4.12' testCompile 'org.assertj:assertj-core:1.7.1' - testCompile "org.mockito:mockito-core:1.10.19" - testCompile('org.robolectric:robolectric:3.0') { - exclude group: 'commons-logging', module: 'commons-logging' - exclude group: 'org.apache.httpcomponents', module: 'httpclient' - } + testCompile 'org.mockito:mockito-core:1.10.19' + testCompile 'org.robolectric:robolectric:3.1' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateAlarmTest.kt b/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateAlarmTest.kt index d1f918ebf1..deddd2c1c6 100644 --- a/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateAlarmTest.kt +++ b/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateAlarmTest.kt @@ -94,18 +94,6 @@ class LibraryUpdateAlarmTest { assertThat(expectedIntent.action).isEqualTo(pendingIntent.savedIntents[0].action) } - @Test - fun testLibraryUpdateServiceIsStartedWhenUpdateIntentIsReceived() { - val intent = Intent(context, LibraryUpdateService::class.java) - intent.putExtra("is_manual", false) - assertThat(app.nextStartedService).isNotEqualTo(intent) - - val alarm = LibraryUpdateAlarm() - alarm.onReceive(context, Intent(LibraryUpdateAlarm.LIBRARY_UPDATE_ACTION)) - - assertThat(app.nextStartedService).isEqualTo(intent) - } - @Test fun testReceiverDoesntReactToNullActions() { val prefs = PreferencesHelper(context) @@ -128,7 +116,9 @@ class LibraryUpdateAlarmTest { val shouldRunAt = SystemClock.elapsedRealtime() + hours * 60 * 60 * 1000 // Margin error of 3 seconds - assertThat(alarmManager.nextScheduledAlarm.triggerAtTime).isGreaterThan(shouldRunAt - 3000).isLessThan(shouldRunAt + 3000) + assertThat(alarmManager.nextScheduledAlarm.triggerAtTime) + .isGreaterThan(shouldRunAt - 3000) + .isLessThan(shouldRunAt + 3000) } } diff --git a/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateServiceTest.kt b/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateServiceTest.kt index 49c1d5de2b..0e12fcda54 100644 --- a/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateServiceTest.kt +++ b/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateServiceTest.kt @@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.data.library import android.app.Application import android.content.Context -import android.os.Build import eu.kanade.tachiyomi.AppModule import eu.kanade.tachiyomi.BuildConfig import eu.kanade.tachiyomi.CustomRobolectricGradleTestRunner @@ -29,7 +28,7 @@ import uy.kohesive.injekt.api.addSingleton import uy.kohesive.injekt.registry.default.DefaultRegistrar import java.util.* -@Config(constants = BuildConfig::class, sdk = intArrayOf(Build.VERSION_CODES.LOLLIPOP)) +@Config(constants = BuildConfig::class) @RunWith(CustomRobolectricGradleTestRunner::class) class LibraryUpdateServiceTest { @@ -62,8 +61,6 @@ class LibraryUpdateServiceTest { @Test fun testLifecycle() { - println(service.db) - // Smoke test Robolectric.buildService(LibraryUpdateService::class.java) .attach() @@ -75,8 +72,6 @@ class LibraryUpdateServiceTest { @Test fun testUpdateManga() { - println(service.db) - val manga = createManga("/manga1")[0] manga.id = 1L service.db.insertManga(manga).executeAsBlocking() @@ -93,7 +88,6 @@ class LibraryUpdateServiceTest { @Test fun testContinuesUpdatingWhenAMangaFails() { var favManga = createManga("/manga1", "/manga2", "/manga3") - println(service.db) service.db.insertMangas(favManga).executeAsBlocking() favManga = service.db.getFavoriteMangas().executeAsBlocking() diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index adf5b5618c..ec9f420246 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip