From f3689f09cd6019deb6badbe8554b2de6fa2bbf77 Mon Sep 17 00:00:00 2001 From: inorichi Date: Sat, 28 Oct 2017 16:10:51 +0200 Subject: [PATCH] Use gradle's new dependencies API. Update a few dependencies --- .travis.yml | 2 +- app/build.gradle | 134 +++++++++--------- .../tachiyomi/data/backup/BackupCreatorJob.kt | 1 - .../data/library/LibraryUpdateJob.kt | 1 - .../data/updater/UpdateCheckerJob.kt | 1 - build.gradle | 4 +- 6 files changed, 70 insertions(+), 73 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99bfa1a5ab..c67ceaa113 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: android android: components: - - build-tools-26.0.1 + - build-tools-26.0.2 - android-26 - extra-android-m2repository - extra-google-m2repository diff --git a/app/build.gradle b/app/build.gradle index 06397b1857..e954a97886 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -102,134 +102,134 @@ android { dependencies { // Modified dependencies - compile 'com.github.inorichi:subsampling-scale-image-view:01e5385' - compile 'com.github.inorichi:tachimage:68cd311' - compile 'com.github.inorichi:junrar-android:634c1f5' + implementation 'com.github.inorichi:subsampling-scale-image-view:01e5385' + implementation 'com.github.inorichi:tachimage:68cd311' + implementation 'com.github.inorichi:junrar-android:634c1f5' // Android support library final support_library_version = '26.1.0' - compile "com.android.support:support-v4:$support_library_version" - compile "com.android.support:appcompat-v7:$support_library_version" - compile "com.android.support:cardview-v7:$support_library_version" - compile "com.android.support:design:$support_library_version" - compile "com.android.support:recyclerview-v7:$support_library_version" - compile "com.android.support:preference-v7:$support_library_version" - compile "com.android.support:support-annotations:$support_library_version" - compile "com.android.support:customtabs:$support_library_version" + implementation "com.android.support:support-v4:$support_library_version" + implementation "com.android.support:appcompat-v7:$support_library_version" + implementation "com.android.support:cardview-v7:$support_library_version" + implementation "com.android.support:design:$support_library_version" + implementation "com.android.support:recyclerview-v7:$support_library_version" + implementation "com.android.support:preference-v7:$support_library_version" + implementation "com.android.support:support-annotations:$support_library_version" + implementation "com.android.support:customtabs:$support_library_version" - compile 'com.android.support.constraint:constraint-layout:1.0.2' + implementation 'com.android.support.constraint:constraint-layout:1.0.2' - compile 'com.android.support:multidex:1.0.1' + implementation 'com.android.support:multidex:1.0.1' // ReactiveX - compile 'io.reactivex:rxandroid:1.2.1' - compile 'io.reactivex:rxjava:1.3.2' - compile 'com.jakewharton.rxrelay:rxrelay:1.2.0' - compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2' - compile 'com.github.pwittchen:reactivenetwork:0.7.0' + implementation 'io.reactivex:rxandroid:1.2.1' + implementation 'io.reactivex:rxjava:1.3.3' + implementation 'com.jakewharton.rxrelay:rxrelay:1.2.0' + implementation 'com.f2prateek.rx.preferences:rx-preferences:1.0.2' + implementation 'com.github.pwittchen:reactivenetwork:0.7.0' // Network client - compile "com.squareup.okhttp3:okhttp:3.9.0" - compile 'com.squareup.okio:okio:1.13.0' + implementation "com.squareup.okhttp3:okhttp:3.9.0" + implementation 'com.squareup.okio:okio:1.13.0' // REST final retrofit_version = '2.3.0' - compile "com.squareup.retrofit2:retrofit:$retrofit_version" - compile "com.squareup.retrofit2:converter-gson:$retrofit_version" - compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version" + implementation "com.squareup.retrofit2:retrofit:$retrofit_version" + implementation "com.squareup.retrofit2:converter-gson:$retrofit_version" + implementation "com.squareup.retrofit2:adapter-rxjava:$retrofit_version" // JSON - compile 'com.google.code.gson:gson:2.8.2' - compile 'com.github.salomonbrys.kotson:kotson:2.5.0' + implementation 'com.google.code.gson:gson:2.8.2' + implementation 'com.github.salomonbrys.kotson:kotson:2.5.0' // YAML - compile 'com.github.bmoliveira:snake-yaml:v1.18-android' + implementation 'com.github.bmoliveira:snake-yaml:v1.18-android' // JavaScript engine - compile 'com.squareup.duktape:duktape-android:1.2.0' + implementation 'com.squareup.duktape:duktape-android:1.2.0' // Disk - compile 'com.jakewharton:disklrucache:2.0.2' - compile 'com.github.seven332:unifile:1.0.0' + implementation 'com.jakewharton:disklrucache:2.0.2' + implementation 'com.github.seven332:unifile:1.0.0' // HTML parser - compile 'org.jsoup:jsoup:1.10.2' + implementation 'org.jsoup:jsoup:1.10.2' // Job scheduling - compile 'com.evernote:android-job:1.1.11' - compile 'com.google.android.gms:play-services-gcm:11.4.0' + implementation 'com.evernote:android-job:1.2.0' + implementation 'com.google.android.gms:play-services-gcm:11.4.2' // Changelog - compile 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0' + implementation 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0' // Database - compile "com.pushtorefresh.storio:sqlite:1.13.0" + implementation "com.pushtorefresh.storio:sqlite:1.13.0" // Model View Presenter final nucleus_version = '3.0.0' - compile "info.android15.nucleus:nucleus:$nucleus_version" - compile "info.android15.nucleus:nucleus-support-v7:$nucleus_version" + implementation "info.android15.nucleus:nucleus:$nucleus_version" + implementation "info.android15.nucleus:nucleus-support-v7:$nucleus_version" // Dependency injection - compile "uy.kohesive.injekt:injekt-core:1.16.1" + implementation "uy.kohesive.injekt:injekt-core:1.16.1" // Image library final glide_version = '4.2.0' - compile "com.github.bumptech.glide:glide:$glide_version" - compile "com.github.bumptech.glide:okhttp3-integration:$glide_version" + implementation "com.github.bumptech.glide:glide:$glide_version" + implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version" kapt "com.github.bumptech.glide:compiler:$glide_version" // Transformations - compile 'jp.wasabeef:glide-transformations:3.0.1' + implementation 'jp.wasabeef:glide-transformations:3.0.1' // Logging - compile 'com.jakewharton.timber:timber:4.5.1' + implementation 'com.jakewharton.timber:timber:4.5.1' // Crash reports - compile 'ch.acra:acra:4.9.2' + implementation 'ch.acra:acra:4.9.2' // Sort - compile 'com.github.gpanther:java-nat-sort:natural-comparator-1.1' + implementation 'com.github.gpanther:java-nat-sort:natural-comparator-1.1' // UI - compile 'com.dmitrymalkovich.android:material-design-dimens:1.4' - compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4' - compile 'eu.davidea:flexible-adapter:5.0.0-rc1' - compile 'com.nononsenseapps:filepicker:2.5.2' - compile 'com.github.amulyakhare:TextDrawable:558677e' - compile('com.afollestad.material-dialogs:core:0.9.4.7') { + implementation 'com.dmitrymalkovich.android:material-design-dimens:1.4' + implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4' + implementation 'eu.davidea:flexible-adapter:5.0.0-rc1' + implementation 'com.nononsenseapps:filepicker:2.5.2' + implementation 'com.github.amulyakhare:TextDrawable:558677e' + implementation('com.afollestad.material-dialogs:core:0.9.4.7') { exclude group: "com.android.support", module: "support-v13" } - compile 'me.zhanghai.android.systemuihelper:library:1.0.0' - compile 'com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.0.4' - compile 'com.github.mthli:Slice:v1.2' + implementation 'me.zhanghai.android.systemuihelper:library:1.0.0' + implementation 'com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.0.4' + implementation 'com.github.mthli:Slice:v1.2' // Conductor - compile "com.bluelinelabs:conductor:2.1.4" - compile 'com.github.inorichi:conductor-support-preference:26.0.2' + implementation "com.bluelinelabs:conductor:2.1.4" + implementation 'com.github.inorichi:conductor-support-preference:26.0.2' // RxBindings final rxbindings_version = '1.0.1' - compile "com.jakewharton.rxbinding:rxbinding-kotlin:$rxbindings_version" - compile "com.jakewharton.rxbinding:rxbinding-appcompat-v7-kotlin:$rxbindings_version" - compile "com.jakewharton.rxbinding:rxbinding-support-v4-kotlin:$rxbindings_version" - compile "com.jakewharton.rxbinding:rxbinding-recyclerview-v7-kotlin:$rxbindings_version" + implementation "com.jakewharton.rxbinding:rxbinding-kotlin:$rxbindings_version" + implementation "com.jakewharton.rxbinding:rxbinding-appcompat-v7-kotlin:$rxbindings_version" + implementation "com.jakewharton.rxbinding:rxbinding-support-v4-kotlin:$rxbindings_version" + implementation "com.jakewharton.rxbinding:rxbinding-recyclerview-v7-kotlin:$rxbindings_version" // Tests - testCompile 'junit:junit:4.12' - testCompile 'org.assertj:assertj-core:1.7.1' - testCompile 'org.mockito:mockito-core:1.10.19' + testImplementation 'junit:junit:4.12' + testImplementation 'org.assertj:assertj-core:1.7.1' + testImplementation 'org.mockito:mockito-core:1.10.19' final robolectric_version = '3.1.4' - testCompile "org.robolectric:robolectric:$robolectric_version" - testCompile "org.robolectric:shadows-multidex:$robolectric_version" - testCompile "org.robolectric:shadows-play-services:$robolectric_version" + testImplementation "org.robolectric:robolectric:$robolectric_version" + testImplementation "org.robolectric:shadows-multidex:$robolectric_version" + testImplementation "org.robolectric:shadows-play-services:$robolectric_version" - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" final coroutines_version = '0.19.1' - compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" - compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" } buildscript { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt index b23157c504..2e33f642c7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt @@ -29,7 +29,6 @@ class BackupCreatorJob : Job() { if (interval > 0) { JobRequest.Builder(TAG) .setPeriodic(interval * 60 * 60 * 1000L, 10 * 60 * 1000) - .setPersisted(true) .setUpdateCurrent(true) .build() .schedule() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt index d109a6f50a..ab386b1330 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt @@ -34,7 +34,6 @@ class LibraryUpdateJob : Job() { .setRequiredNetworkType(wifiRestriction) .setRequiresCharging(acRestriction) .setRequirementsEnforced(true) - .setPersisted(true) .setUpdateCurrent(true) .build() .schedule() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt index 9eca399791..696de52774 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateCheckerJob.kt @@ -54,7 +54,6 @@ class UpdateCheckerJob : Job() { .setPeriodic(24 * 60 * 60 * 1000, 60 * 60 * 1000) .setRequiredNetworkType(JobRequest.NetworkType.CONNECTED) .setRequirementsEnforced(true) - .setPersisted(true) .setUpdateCurrent(true) .build() .schedule() diff --git a/build.gradle b/build.gradle index e7c529fac7..e0f4584f3f 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' - classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0' + classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0' classpath 'com.github.zellius:android-shortcut-gradle-plugin:0.1.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -17,7 +17,7 @@ buildscript { allprojects { repositories { jcenter() - maven { url "https://maven.google.com" } + google() maven { url "https://jitpack.io" } } }