Update dependencies (#611)

This commit is contained in:
Mitchell Syer
2023-08-04 22:48:24 -04:00
committed by GitHub
parent 3675580d87
commit 689847d864
9 changed files with 35 additions and 32 deletions

View File

@@ -1,9 +1,9 @@
[versions] [versions]
kotlin = "1.8.0" kotlin = "1.9.0"
coroutines = "1.6.4" coroutines = "1.7.2"
serialization = "1.4.1" serialization = "1.5.1"
okhttp = "5.0.0-alpha.11" # Major version is locked by Tachiyomi extensions okhttp = "5.0.0-alpha.11" # Major version is locked by Tachiyomi extensions
javalin = "4.6.6" # Javalin 5.0.0+ requires Java 11 javalin = "4.6.8" # Javalin 5.0.0+ requires Java 11
jackson = "2.13.3" # jackson version locked by javalin, ref: `io.javalin.core.util.OptionalDependency` jackson = "2.13.3" # jackson version locked by javalin, ref: `io.javalin.core.util.OptionalDependency`
exposed = "0.40.1" exposed = "0.40.1"
dex2jar = "v64" dex2jar = "v64"
@@ -11,6 +11,7 @@ rhino = "1.7.14"
settings = "1.0.0-RC" settings = "1.0.0-RC"
twelvemonkeys = "3.9.4" twelvemonkeys = "3.9.4"
playwright = "1.28.0" playwright = "1.28.0"
graphqlkotlin = "6.5.3"
[libraries] [libraries]
# Kotlin # Kotlin
@@ -28,8 +29,8 @@ serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-jso
serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization" } serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization" }
# Logging # Logging
slf4japi = "org.slf4j:slf4j-api:2.0.6" slf4japi = "org.slf4j:slf4j-api:2.0.7"
logback = "ch.qos.logback:logback-classic:1.3.5" logback = "ch.qos.logback:logback-classic:1.3.8"
kotlinlogging = "io.github.microutils:kotlin-logging:3.0.5" kotlinlogging = "io.github.microutils:kotlin-logging:3.0.5"
# OkHttp # OkHttp
@@ -45,6 +46,11 @@ jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", ver
jackson-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" } jackson-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
jackson-annotations = { module = "com.fasterxml.jackson.core:jackson-annotations", version.ref = "jackson" } jackson-annotations = { module = "com.fasterxml.jackson.core:jackson-annotations", version.ref = "jackson" }
# GraphQL
graphql-kotlin-server = { module = "com.expediagroup:graphql-kotlin-server", version.ref = "graphqlkotlin" }
graphql-kotlin-scheme = { module = "com.expediagroup:graphql-kotlin-schema-generator", version.ref = "graphqlkotlin" }
graphql-scalars = "com.graphql-java:graphql-java-extended-scalars:20.2"
# Exposed ORM # Exposed ORM
exposed-core = { module = "org.jetbrains.exposed:exposed-core", version.ref = "exposed" } exposed-core = { module = "org.jetbrains.exposed:exposed-core", version.ref = "exposed" }
exposed-dao = { module = "org.jetbrains.exposed:exposed-dao", version.ref = "exposed" } exposed-dao = { module = "org.jetbrains.exposed:exposed-dao", version.ref = "exposed" }
@@ -56,7 +62,7 @@ h2 = "com.h2database:h2:1.4.200" # current database driver, can't update to h2 v
exposed-migrations = "com.github.Suwayomi:exposed-migrations:3.2.0" exposed-migrations = "com.github.Suwayomi:exposed-migrations:3.2.0"
# Dependency Injection # Dependency Injection
kodein = "org.kodein.di:kodein-di-conf-jvm:7.15.0" kodein = "org.kodein.di:kodein-di-conf-jvm:7.20.2"
# tray icon # tray icon
systemtray-core = "com.dorkbox:SystemTray:4.2.1" systemtray-core = "com.dorkbox:SystemTray:4.2.1"
@@ -66,7 +72,7 @@ systemtray-desktop = "com.dorkbox:Desktop:1.0"
# dependencies of Tachiyomi extensions # dependencies of Tachiyomi extensions
injekt = "com.github.inorichi.injekt:injekt-core:65b0440" injekt = "com.github.inorichi.injekt:injekt-core:65b0440"
rxjava = "io.reactivex:rxjava:1.3.8" rxjava = "io.reactivex:rxjava:1.3.8"
jsoup = "org.jsoup:jsoup:1.15.3" jsoup = "org.jsoup:jsoup:1.16.1"
# Config # Config
config = "com.typesafe:config:1.4.2" config = "com.typesafe:config:1.4.2"
@@ -92,15 +98,15 @@ xmlpull = "xmlpull:xmlpull:1.1.3.4a"
# Disk & File # Disk & File
appdirs = "net.harawata:appdirs:1.2.1" appdirs = "net.harawata:appdirs:1.2.1"
zip4j = "net.lingala.zip4j:zip4j:2.11.2" zip4j = "net.lingala.zip4j:zip4j:2.11.5"
commonscompress = "org.apache.commons:commons-compress:1.23.0" commonscompress = "org.apache.commons:commons-compress:1.23.0"
junrar = "com.github.junrar:junrar:7.5.3" junrar = "com.github.junrar:junrar:7.5.4"
# CloudflareInterceptor # CloudflareInterceptor
playwright = { module = "com.microsoft.playwright:playwright", version.ref = "playwright" } playwright = { module = "com.microsoft.playwright:playwright", version.ref = "playwright" }
# AES/CBC/PKCS7Padding Cypher provider # AES/CBC/PKCS7Padding Cypher provider
bouncycastle = "org.bouncycastle:bcprov-jdk18on:1.72" bouncycastle = "org.bouncycastle:bcprov-jdk18on:1.75"
# AndroidX annotations # AndroidX annotations
android-annotations = "androidx.annotation:annotation:1.5.0" android-annotations = "androidx.annotation:annotation:1.5.0"
@@ -114,7 +120,7 @@ settings-core = { module = "com.russhwolf:multiplatform-settings-jvm", version.r
settings-serialization = { module = "com.russhwolf:multiplatform-settings-serialization-jvm", version.ref = "settings" } settings-serialization = { module = "com.russhwolf:multiplatform-settings-serialization-jvm", version.ref = "settings" }
# ICU4J # ICU4J
icu4j = "com.ibm.icu:icu4j:72.1" icu4j = "com.ibm.icu:icu4j:73.2"
# Image Decoding implementation provider # Image Decoding implementation provider
twelvemonkeys-common-lang = { module = "com.twelvemonkeys.common:common-lang", version.ref = "twelvemonkeys" } twelvemonkeys-common-lang = { module = "com.twelvemonkeys.common:common-lang", version.ref = "twelvemonkeys" }
@@ -126,7 +132,7 @@ twelvemonkeys-imageio-jpeg = { module = "com.twelvemonkeys.imageio:imageio-jpeg"
twelvemonkeys-imageio-webp = { module = "com.twelvemonkeys.imageio:imageio-webp", version.ref = "twelvemonkeys" } twelvemonkeys-imageio-webp = { module = "com.twelvemonkeys.imageio:imageio-webp", version.ref = "twelvemonkeys" }
# Testing # Testing
mockk = "io.mockk:mockk:1.13.2" mockk = "io.mockk:mockk:1.13.5"
# cron scheduler # cron scheduler
cron4j = "it.sauronsoftware.cron4j:cron4j:2.2.5" cron4j = "it.sauronsoftware.cron4j:cron4j:2.2.5"
@@ -146,10 +152,10 @@ kotlinter = { id = "org.jmailen.kotlinter", version = "3.12.0"}
buildconfig = { id = "com.github.gmazzo.buildconfig", version = "3.1.0"} buildconfig = { id = "com.github.gmazzo.buildconfig", version = "3.1.0"}
# Download # Download
download = { id = "de.undercouch.download", version = "5.3.0"} download = { id = "de.undercouch.download", version = "5.4.0"}
# ShadowJar # ShadowJar
shadowjar = { id = "com.github.johnrengelman.shadow", version = "7.1.2"} shadowjar = { id = "com.github.johnrengelman.shadow", version = "8.1.1"}
[bundles] [bundles]
shared = [ shared = [

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@@ -24,6 +24,11 @@ dependencies {
implementation(libs.bundles.javalin) implementation(libs.bundles.javalin)
implementation(libs.bundles.jackson) implementation(libs.bundles.jackson)
// GraphQL
implementation(libs.graphql.kotlin.server)
implementation(libs.graphql.kotlin.scheme)
implementation(libs.graphql.scalars)
// Exposed ORM // Exposed ORM
implementation(libs.bundles.exposed) implementation(libs.bundles.exposed)
implementation(libs.h2) implementation(libs.h2)
@@ -65,10 +70,6 @@ dependencies {
// implementation(fileTree("lib/")) // implementation(fileTree("lib/"))
implementation(kotlin("script-runtime")) implementation(kotlin("script-runtime"))
implementation("com.expediagroup:graphql-kotlin-server:6.4.0")
implementation("com.expediagroup:graphql-kotlin-schema-generator:6.4.0")
implementation("com.graphql-java:graphql-java-extended-scalars:20.0")
testImplementation(libs.mockk) testImplementation(libs.mockk)
implementation(libs.cron4j) implementation(libs.cron4j)

View File

@@ -67,7 +67,7 @@ suspend fun Call.await(): Response {
} }
continuation.resume(response) { continuation.resume(response) {
response.body?.closeQuietly() response.body.closeQuietly()
} }
} }
@@ -120,7 +120,7 @@ fun OkHttpClient.newCallWithProgress(request: Request, listener: ProgressListene
.addNetworkInterceptor { chain -> .addNetworkInterceptor { chain ->
val originalResponse = chain.proceed(chain.request()) val originalResponse = chain.proceed(chain.request())
originalResponse.newBuilder() originalResponse.newBuilder()
.body(ProgressResponseBody(originalResponse.body!!, listener)) .body(ProgressResponseBody(originalResponse.body, listener))
.build() .build()
} }
.build() .build()
@@ -132,7 +132,7 @@ inline fun <reified T> Response.parseAs(): T {
// Avoiding Injekt.get<Json>() due to compiler issues // Avoiding Injekt.get<Json>() due to compiler issues
val json = Injekt.getInstance<Json>(fullType<Json>().type) val json = Injekt.getInstance<Json>(fullType<Json>().type)
this.use { this.use {
val responseBody = it.body?.string().orEmpty() val responseBody = it.body.string()
return json.decodeFromString(responseBody) return json.decodeFromString(responseBody)
} }
} }

View File

@@ -22,5 +22,5 @@ fun Element.attrOrText(css: String): String {
* @param html the body of the response. Use only if the body was read before calling this method. * @param html the body of the response. Use only if the body was read before calling this method.
*/ */
fun Response.asJsoup(html: String? = null): Document { fun Response.asJsoup(html: String? = null): Document {
return Jsoup.parse(html ?: body!!.string(), request.url.toString()) return Jsoup.parse(html ?: body.string(), request.url.toString())
} }

View File

@@ -260,7 +260,7 @@ object Extension {
val downloadedFile = File(savePath) val downloadedFile = File(savePath)
downloadedFile.sink().buffer().use { sink -> downloadedFile.sink().buffer().use { sink ->
response.body!!.source().use { source -> response.body.source().use { source ->
sink.writeAll(source) sink.writeAll(source)
sink.flush() sink.flush()
} }

View File

@@ -27,7 +27,7 @@ suspend fun Call.await(): Response {
} }
continuation.resume(response) { continuation.resume(response) {
response.body?.closeQuietly() response.body.closeQuietly()
} }
} }

View File

@@ -26,16 +26,12 @@ class UnzippingInterceptor : Interceptor {
@Throws(IOException::class) @Throws(IOException::class)
private fun unzip(response: Response): Response { private fun unzip(response: Response): Response {
if (response.body == null) {
return response
}
// check if we have gzip response // check if we have gzip response
val contentEncoding: String? = response.headers["Content-Encoding"] val contentEncoding: String? = response.headers["Content-Encoding"]
// this is used to decompress gzipped responses // this is used to decompress gzipped responses
return if (contentEncoding != null && contentEncoding == "gzip") { return if (contentEncoding != null && contentEncoding == "gzip") {
val body = response.body!! val body = response.body
val contentLength: Long = body.contentLength() val contentLength: Long = body.contentLength()
val responseBody = GzipSource(body.source()) val responseBody = GzipSource(body.source())
val strippedHeaders: Headers = response.headers.newBuilder().build() val strippedHeaders: Headers = response.headers.newBuilder().build()

View File

@@ -45,7 +45,7 @@ object AppMutex {
.build() .build()
val response = try { val response = try {
client.newCall(request).execute().use { response -> response.body!!.string() } client.newCall(request).execute().body.string()
} catch (e: IOException) { } catch (e: IOException) {
return AppMutexState.Clear return AppMutexState.Clear
} }