Update dependencies

This commit is contained in:
Koitharu
2024-05-03 08:52:38 +03:00
parent ab20e50dc1
commit 7a3fd20dfa
11 changed files with 33 additions and 14 deletions

1
.gitignore vendored
View File

@@ -24,3 +24,4 @@
/captures
.externalNativeBuild
.cxx
/.idea/deviceManager.xml

View File

@@ -91,9 +91,9 @@ dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.13.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.activity:activity-ktx:1.9.0'
implementation 'androidx.fragment:fragment-ktx:1.6.2'
implementation 'androidx.fragment:fragment-ktx:1.7.0'
implementation 'androidx.collection:collection-ktx:1.4.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
implementation 'androidx.lifecycle:lifecycle-service:2.7.0'
@@ -101,12 +101,12 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02'
implementation 'androidx.viewpager2:viewpager2:1.1.0-rc01'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.biometric:biometric-ktx:1.2.0-alpha05'
implementation 'com.google.android.material:material:1.12.0-rc01'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.7.0'
implementation 'androidx.webkit:webkit:1.10.0'
implementation 'androidx.webkit:webkit:1.11.0'
implementation 'androidx.work:work-runtime:2.9.0'
//noinspection GradleDependency
@@ -146,6 +146,7 @@ dependencies {
implementation 'org.conscrypt:conscrypt-android:2.5.2'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.14'
debugImplementation 'com.github.Koitharu:WorkInspector:2c2919f9f1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.json:json:20240303'

View File

@@ -8,12 +8,14 @@ import org.koitharu.kotatsu.local.data.LocalMangaRepository
import org.koitharu.kotatsu.local.data.PagesCache
import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.reader.domain.PageLoader
import org.koitharu.workinspector.WorkInspector
class KotatsuApp : BaseApp() {
override fun attachBaseContext(base: Context?) {
override fun attachBaseContext(base: Context) {
super.attachBaseContext(base)
enableStrictMode()
WorkInspector.setLauncherIconEnabled(base, false)
}
private fun enableStrictMode() {

View File

@@ -13,4 +13,9 @@
android:title="@string/check_for_new_chapters"
app:showAsAction="never" />
<item
android:id="@id/action_works"
android:title="Works"
app:showAsAction="never" />
</menu>

View File

@@ -87,7 +87,7 @@ open class BaseApp : Application(), Configuration.Provider {
WorkServiceStopHelper(workManagerProvider).setup()
}
override fun attachBaseContext(base: Context?) {
override fun attachBaseContext(base: Context) {
super.attachBaseContext(base)
initAcra {
buildConfigClass = BuildConfig::class.java

View File

@@ -42,6 +42,8 @@ import androidx.fragment.app.DialogFragment
import androidx.fragment.app.Fragment
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.coroutineScope
import androidx.webkit.WebViewCompat
import androidx.webkit.WebViewFeature
import androidx.work.CoroutineWorker
import com.google.android.material.elevation.ElevationOverlayProvider
import kotlinx.coroutines.Dispatchers
@@ -59,7 +61,6 @@ import okio.use
import org.json.JSONException
import org.jsoup.internal.StringUtil.StringJoiner
import org.koitharu.kotatsu.BuildConfig
import org.koitharu.kotatsu.R
import org.koitharu.kotatsu.parsers.util.runCatchingCancellable
import org.xmlpull.v1.XmlPullParser
import org.xmlpull.v1.XmlPullParserException
@@ -263,6 +264,9 @@ fun WebView.configureForParser(userAgentOverride: String?) = with(settings) {
javaScriptEnabled = true
domStorageEnabled = true
mediaPlaybackRequiresUserGesture = false
if (WebViewFeature.isFeatureSupported(WebViewFeature.MUTE_AUDIO)) {
WebViewCompat.setAudioMuted(this@configureForParser, true)
}
databaseEnabled = true
if (userAgentOverride != null) {
userAgentString = userAgentOverride

View File

@@ -103,6 +103,13 @@ class SettingsActivity :
true
}
R.id.action_works -> {
val intent = Intent()
intent.component = ComponentName(this, "org.koitharu.workinspector.WorkInspectorActivity")
startActivity(intent)
true
}
else -> super.onOptionsItemSelected(item)
}

View File

@@ -58,7 +58,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_margin="8dp"
app:cardBackgroundColor="?colorBackgroundFloating"
app:cardBackgroundColor="?colorSurfaceContainer"
app:layout_insetEdge="bottom">
<com.google.android.material.appbar.MaterialToolbar
@@ -102,7 +102,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/bg_card"
android:backgroundTint="?colorBackgroundFloating"
android:backgroundTint="?colorSurfaceContainer"
android:gravity="center_horizontal"
android:orientation="vertical"
android:outlineProvider="background"

View File

@@ -3,6 +3,7 @@
<item name="toolbar" type="id" />
<item name="container" type="id" />
<item name="action_leaks" type="id" />
<item name="action_works" type="id" />
<item name="action_tracker" type="id" />
<item name="fast_scroller" type="id" />
<item name="group_branches" type="id" />

View File

@@ -2,6 +2,4 @@ package org.koitharu.kotatsu
import org.koitharu.kotatsu.core.BaseApp
class KotatsuApp : BaseApp() {
}
class KotatsuApp : BaseApp()

View File

@@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.android.tools.build:gradle:8.4.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23'
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.51.1'
classpath 'com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.23-1.0.19'