Update gradle, kotlin and enum extensions
This commit is contained in:
@@ -2,8 +2,8 @@ import tasks.ReportGenerateTask
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.8.22'
|
||||
id 'com.google.devtools.ksp' version '1.8.22-1.0.11'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.9.0'
|
||||
id 'com.google.devtools.ksp' version '1.9.0-1.0.13'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ afterEvaluate {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
|
||||
implementation 'com.squareup.okio:okio:3.3.0'
|
||||
api 'org.jsoup:jsoup:1.16.1'
|
||||
|
||||
@@ -8,6 +8,6 @@ repositories {
|
||||
dependencies {
|
||||
implementation gradleApi()
|
||||
implementation 'org.simpleframework:simple-xml:2.7.1'
|
||||
implementation 'com.soywiz.korlibs.korte:korte-jvm:4.0.6'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
|
||||
implementation 'com.soywiz.korlibs.korte:korte-jvm:4.0.9'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
|
||||
}
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -3,5 +3,5 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.google.devtools.ksp:symbol-processing-api:1.8.22-1.0.11'
|
||||
implementation 'com.google.devtools.ksp:symbol-processing-api:1.9.0-1.0.13'
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ abstract class MangaParser @InternalParsersApi constructor(
|
||||
protected open val defaultSortOrder: SortOrder
|
||||
get() {
|
||||
val supported = sortOrders
|
||||
return SortOrder.values().first { it in supported }
|
||||
return SortOrder.entries.first { it in supported }
|
||||
}
|
||||
|
||||
@JvmField
|
||||
|
||||
@@ -40,7 +40,6 @@ inline fun <T, reified R> Array<T>.mapToArray(transform: (T) -> R): Array<R> = A
|
||||
}
|
||||
|
||||
fun <K, V> List<Pair<K, V>>.toMutableMap(): MutableMap<K, V> = toMap(ArrayMap(size))
|
||||
fun <T : Enum<T>> Array<T>.names() = mapToArray { it.name }
|
||||
|
||||
fun <T> MutableList<T>.move(sourceIndex: Int, targetIndex: Int) {
|
||||
if (sourceIndex <= targetIndex) {
|
||||
|
||||
13
src/main/kotlin/org/koitharu/kotatsu/parsers/util/Enum.kt
Normal file
13
src/main/kotlin/org/koitharu/kotatsu/parsers/util/Enum.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
@file:JvmName("EnumUtils")
|
||||
|
||||
package org.koitharu.kotatsu.parsers.util
|
||||
|
||||
import kotlin.enums.EnumEntries
|
||||
|
||||
fun <E : Enum<E>> EnumEntries<E>.names() = Array(size) { i ->
|
||||
get(i).name
|
||||
}
|
||||
|
||||
fun <E : Enum<E>> EnumEntries<E>.find(name: String): E? {
|
||||
return find { x -> x.name == name }
|
||||
}
|
||||
@@ -11,7 +11,7 @@ class AuthCheckExtension : BeforeAllCallback {
|
||||
private val loaderContext: MangaLoaderContext = MangaLoaderContextMock
|
||||
|
||||
override fun beforeAll(context: ExtensionContext) {
|
||||
for (source in MangaSource.values()) {
|
||||
for (source in MangaSource.entries) {
|
||||
if (source == MangaSource.LOCAL || source == MangaSource.DUMMY) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user