Update dependencies

pull/104/head
Koitharu 4 years ago
parent 4be514b754
commit 10ec72047c
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

@ -8,6 +8,7 @@ plugins {
android { android {
compileSdkVersion 31 compileSdkVersion 31
buildToolsVersion '30.0.3' buildToolsVersion '30.0.3'
namespace 'org.koitharu.kotatsu'
defaultConfig { defaultConfig {
applicationId 'org.koitharu.kotatsu' applicationId 'org.koitharu.kotatsu'
@ -48,14 +49,15 @@ android {
kotlinOptions { kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString() jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += [ freeCompilerArgs += [
'-Xjvm-default=enable',
'-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi', '-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi',
'-Xopt-in=kotlinx.coroutines.FlowPreview', '-Xopt-in=kotlinx.coroutines.FlowPreview',
'-Xopt-in=kotlin.contracts.ExperimentalContracts', '-Xopt-in=kotlin.contracts.ExperimentalContracts',
] ]
} }
lintOptions { lint {
disable 'MissingTranslation'
abortOnError false abortOnError false
disable 'MissingTranslation'
} }
testOptions { testOptions {
unitTests.includeAndroidResources = true unitTests.includeAndroidResources = true
@ -69,7 +71,7 @@ dependencies {
implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.activity:activity-ktx:1.4.0' implementation 'androidx.activity:activity-ktx:1.4.0'
implementation 'androidx.fragment:fragment-ktx:1.4.0' implementation 'androidx.fragment:fragment-ktx:1.4.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
@ -79,7 +81,7 @@ dependencies {
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01' implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
implementation 'androidx.preference:preference-ktx:1.1.1' implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.work:work-runtime-ktx:2.7.1' implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'com.google.android.material:material:1.5.0' implementation 'com.google.android.material:material:1.5.0'
//noinspection LifecycleAnnotationProcessorWithJava8 //noinspection LifecycleAnnotationProcessorWithJava8
@ -89,8 +91,8 @@ dependencies {
implementation 'androidx.room:room-ktx:2.4.1' implementation 'androidx.room:room-ktx:2.4.1'
kapt 'androidx.room:room-compiler:2.4.1' kapt 'androidx.room:room-compiler:2.4.1'
implementation 'com.squareup.okhttp3:okhttp:4.9.1' implementation 'com.squareup.okhttp3:okhttp:4.9.3'
implementation 'com.squareup.okio:okio:2.10.0' implementation 'com.squareup.okio:okio:3.0.0'
implementation 'org.jsoup:jsoup:1.14.3' implementation 'org.jsoup:jsoup:1.14.3'
implementation 'com.hannesdorfmann:adapterdelegates4-kotlin-dsl:4.3.1' implementation 'com.hannesdorfmann:adapterdelegates4-kotlin-dsl:4.3.1'

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest <manifest
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools">
package="org.koitharu.kotatsu">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

@ -108,12 +108,12 @@ class MainSettingsFragment : BasePreferenceFragment(R.string.settings),
} }
} }
override fun onPreferenceTreeClick(preference: Preference?): Boolean { override fun onPreferenceTreeClick(preference: Preference): Boolean {
return when (preference?.key) { return when (preference.key) {
AppSettings.KEY_LOCAL_STORAGE -> { AppSettings.KEY_LOCAL_STORAGE -> {
val ctx = context ?: return false val ctx = context ?: return false
StorageSelectDialog.Builder(ctx, settings.getStorageDir(ctx), this) StorageSelectDialog.Builder(ctx, settings.getStorageDir(ctx), this)
.setTitle(preference.title) .setTitle(preference.title ?: "")
.setNegativeButton(android.R.string.cancel) .setNegativeButton(android.R.string.cancel)
.create() .create()
.show() .show()

@ -37,8 +37,8 @@ class NotificationSettingsLegacyFragment : BasePreferenceFragment(R.string.notif
} }
} }
override fun onPreferenceTreeClick(preference: Preference?): Boolean { override fun onPreferenceTreeClick(preference: Preference): Boolean {
return when (preference?.key) { return when (preference.key) {
AppSettings.KEY_NOTIFICATIONS_SOUND -> { AppSettings.KEY_NOTIFICATIONS_SOUND -> {
ringtonePickContract.launch(settings.notificationSound.toUriOrNull()) ringtonePickContract.launch(settings.notificationSound.toUriOrNull())
true true

@ -53,7 +53,7 @@ class SettingsActivity : BaseActivity<ActivitySettingsBinding>(),
pref: Preference pref: Preference
): Boolean { ): Boolean {
val fm = supportFragmentManager val fm = supportFragmentManager
val fragment = fm.fragmentFactory.instantiate(classLoader, pref.fragment) val fragment = fm.fragmentFactory.instantiate(classLoader, pref.fragment ?: return false)
fragment.arguments = pref.extras fragment.arguments = pref.extras
fragment.setTargetFragment(caller, 0) fragment.setTargetFragment(caller, 0)
openFragment(fragment) openFragment(fragment)

@ -51,8 +51,8 @@ class SourceSettingsFragment : PreferenceFragmentCompat() {
} }
} }
override fun onPreferenceTreeClick(preference: Preference?): Boolean { override fun onPreferenceTreeClick(preference: Preference): Boolean {
return when (preference?.key) { return when (preference.key) {
SourceSettings.KEY_AUTH -> { SourceSettings.KEY_AUTH -> {
startActivity( startActivity(
SourceAuthActivity.newIntent( SourceAuthActivity.newIntent(

@ -35,8 +35,8 @@ class TrackerSettingsFragment : BasePreferenceFragment(R.string.new_chapters_che
} }
} }
override fun onPreferenceTreeClick(preference: Preference?): Boolean { override fun onPreferenceTreeClick(preference: Preference): Boolean {
return when (preference?.key) { return when (preference.key) {
AppSettings.KEY_NOTIFICATIONS_SETTINGS -> { AppSettings.KEY_NOTIFICATIONS_SETTINGS -> {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val intent = Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS) val intent = Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)

@ -30,8 +30,8 @@ class AboutSettingsFragment : BasePreferenceFragment(R.string.about) {
} }
override fun onPreferenceTreeClick(preference: Preference?): Boolean { override fun onPreferenceTreeClick(preference: Preference): Boolean {
return when (preference?.key) { return when (preference.key) {
AppSettings.KEY_APP_VERSION -> { AppSettings.KEY_APP_VERSION -> {
checkForUpdates() checkForUpdates()
true true

@ -9,10 +9,11 @@ class EditTextDefaultSummaryProvider(
) : Preference.SummaryProvider<EditTextPreference> { ) : Preference.SummaryProvider<EditTextPreference> {
override fun provideSummary(preference: EditTextPreference): CharSequence { override fun provideSummary(preference: EditTextPreference): CharSequence {
return if (preference.text.isNullOrEmpty()) { val text = preference.text
return if (text.isNullOrEmpty()) {
preference.context.getString(R.string.default_s, defaultValue) preference.context.getString(R.string.default_s, defaultValue)
} else { } else {
preference.text text
} }
} }
} }

@ -8,10 +8,11 @@ class EditTextSummaryProvider(@StringRes private val emptySummaryId: Int) :
Preference.SummaryProvider<EditTextPreference> { Preference.SummaryProvider<EditTextPreference> {
override fun provideSummary(preference: EditTextPreference): CharSequence { override fun provideSummary(preference: EditTextPreference): CharSequence {
return if (preference.text.isNullOrEmpty()) { val text = preference.text
return if (text.isNullOrEmpty()) {
preference.context.getString(emptySummaryId) preference.context.getString(emptySummaryId)
} else { } else {
preference.text text
} }
} }
} }

@ -8,7 +8,7 @@ import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder import androidx.preference.PreferenceViewHolder
class LinksPreference @JvmOverloads constructor( class LinksPreference @JvmOverloads constructor(
context: Context?, context: Context,
attrs: AttributeSet? = null, attrs: AttributeSet? = null,
defStyleAttr: Int = androidx.preference.R.attr.preferenceStyle, defStyleAttr: Int = androidx.preference.R.attr.preferenceStyle,
defStyleRes: Int = 0, defStyleRes: Int = 0,

@ -5,8 +5,8 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.0.2' classpath 'com.android.tools.build:gradle:7.1.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files

@ -1,8 +1,8 @@
#Mon Sep 13 08:29:18 EEST 2021 #Mon Sep 13 08:29:18 EEST 2021
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
# https://gradle.org/release-checksums/ # https://gradle.org/release-checksums/
distributionSha256Sum=0e46229820205440b48a5501122002842b82886e76af35f0f3a069243dca4b3c distributionSha256Sum=f581709a9c35e9cb92e16f585d2c4bc99b2b1a5f85d2badbd3dc6bff59e1e6dd

Loading…
Cancel
Save