Bump dependencies

This commit is contained in:
len 2016-06-15 13:18:27 +02:00
parent a475ecec4d
commit b1d7167112
4 changed files with 12 additions and 36 deletions

View File

@ -78,9 +78,6 @@ android {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
} }
// http://stackoverflow.com/questions/32759529/androidhttpclient-not-found-when-running-robolectric
useLibrary 'org.apache.http.legacy'
} }
dependencies { dependencies {
@ -104,13 +101,13 @@ dependencies {
// ReactiveX // ReactiveX
compile 'io.reactivex:rxandroid:1.2.0' compile 'io.reactivex:rxandroid:1.2.0'
compile 'io.reactivex:rxjava:1.1.5' 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 // Network client
compile "com.squareup.okhttp3:okhttp:3.3.1" compile "com.squareup.okhttp3:okhttp:3.3.1"
// REST // REST
final retrofit_version = '2.0.2' final retrofit_version = '2.1.0'
compile "com.squareup.retrofit2:retrofit:$retrofit_version" compile "com.squareup.retrofit2:retrofit:$retrofit_version"
compile "com.squareup.retrofit2:converter-gson:$retrofit_version" compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version" compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
@ -119,8 +116,8 @@ dependencies {
compile 'com.squareup.okio:okio:1.8.0' compile 'com.squareup.okio:okio:1.8.0'
// JSON // JSON
compile 'com.google.code.gson:gson:2.6.2' compile 'com.google.code.gson:gson:2.7'
compile 'com.github.salomonbrys.kotson:kotson:2.2.1' compile 'com.github.salomonbrys.kotson:kotson:2.2.2'
// YAML // YAML
compile 'org.yaml:snakeyaml:1.17' compile 'org.yaml:snakeyaml:1.17'
@ -138,9 +135,7 @@ dependencies {
compile 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0' compile 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'
// Database // Database
final storio_version = '1.8.0' compile "com.pushtorefresh.storio:sqlite:1.9.0"
compile "com.pushtorefresh.storio:sqlite:$storio_version"
compile "com.pushtorefresh.storio:sqlite-annotations:$storio_version"
// Model View Presenter // Model View Presenter
final nucleus_version = '3.0.0' final nucleus_version = '3.0.0'
@ -171,11 +166,8 @@ dependencies {
// Tests // Tests
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:1.7.1' testCompile 'org.assertj:assertj-core:1.7.1'
testCompile "org.mockito:mockito-core:1.10.19" testCompile 'org.mockito:mockito-core:1.10.19'
testCompile('org.robolectric:robolectric:3.0') { testCompile 'org.robolectric:robolectric:3.1'
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
} }

View File

@ -94,18 +94,6 @@ class LibraryUpdateAlarmTest {
assertThat(expectedIntent.action).isEqualTo(pendingIntent.savedIntents[0].action) 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 @Test
fun testReceiverDoesntReactToNullActions() { fun testReceiverDoesntReactToNullActions() {
val prefs = PreferencesHelper(context) val prefs = PreferencesHelper(context)
@ -128,7 +116,9 @@ class LibraryUpdateAlarmTest {
val shouldRunAt = SystemClock.elapsedRealtime() + hours * 60 * 60 * 1000 val shouldRunAt = SystemClock.elapsedRealtime() + hours * 60 * 60 * 1000
// Margin error of 3 seconds // 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)
} }
} }

View File

@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.data.library
import android.app.Application import android.app.Application
import android.content.Context import android.content.Context
import android.os.Build
import eu.kanade.tachiyomi.AppModule import eu.kanade.tachiyomi.AppModule
import eu.kanade.tachiyomi.BuildConfig import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.CustomRobolectricGradleTestRunner import eu.kanade.tachiyomi.CustomRobolectricGradleTestRunner
@ -29,7 +28,7 @@ import uy.kohesive.injekt.api.addSingleton
import uy.kohesive.injekt.registry.default.DefaultRegistrar import uy.kohesive.injekt.registry.default.DefaultRegistrar
import java.util.* import java.util.*
@Config(constants = BuildConfig::class, sdk = intArrayOf(Build.VERSION_CODES.LOLLIPOP)) @Config(constants = BuildConfig::class)
@RunWith(CustomRobolectricGradleTestRunner::class) @RunWith(CustomRobolectricGradleTestRunner::class)
class LibraryUpdateServiceTest { class LibraryUpdateServiceTest {
@ -62,8 +61,6 @@ class LibraryUpdateServiceTest {
@Test @Test
fun testLifecycle() { fun testLifecycle() {
println(service.db)
// Smoke test // Smoke test
Robolectric.buildService(LibraryUpdateService::class.java) Robolectric.buildService(LibraryUpdateService::class.java)
.attach() .attach()
@ -75,8 +72,6 @@ class LibraryUpdateServiceTest {
@Test @Test
fun testUpdateManga() { fun testUpdateManga() {
println(service.db)
val manga = createManga("/manga1")[0] val manga = createManga("/manga1")[0]
manga.id = 1L manga.id = 1L
service.db.insertManga(manga).executeAsBlocking() service.db.insertManga(manga).executeAsBlocking()
@ -93,7 +88,6 @@ class LibraryUpdateServiceTest {
@Test @Test
fun testContinuesUpdatingWhenAMangaFails() { fun testContinuesUpdatingWhenAMangaFails() {
var favManga = createManga("/manga1", "/manga2", "/manga3") var favManga = createManga("/manga1", "/manga2", "/manga3")
println(service.db)
service.db.insertMangas(favManga).executeAsBlocking() service.db.insertMangas(favManga).executeAsBlocking()
favManga = service.db.getFavoriteMangas().executeAsBlocking() favManga = service.db.getFavoriteMangas().executeAsBlocking()

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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