Depend on JDK 17, update Kotlin to 1.6.10, update dependencies

This commit is contained in:
Syer10
2021-12-14 20:05:06 -05:00
parent c920df98e5
commit 7cf8aa02ca
12 changed files with 20 additions and 53 deletions

View File

@@ -55,7 +55,7 @@ jobs:
- uses: actions/setup-java@v1
if: ${{ matrix.runtime != 'linux-centos-x64' }}
with:
java-version: '15'
java-version: '17'
architecture: ${{ matrix.arch }}
- name: Setup Cl
@@ -70,7 +70,7 @@ jobs:
- name: Build rpm Package
if: ${{ matrix.runtime == 'linux-centos-x64' }}
uses: Syer10/CentOS-Java15-Action@v1
uses: Syer10/CentOS-Java17-Action@v1
with:
command: ./gradlew ${{ matrix.build }}

View File

@@ -31,7 +31,7 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: '15'
java-version: '17'
architecture: x64
- name: Setup Cl

View File

@@ -56,7 +56,7 @@ jobs:
- uses: actions/setup-java@v1
if: ${{ matrix.runtime != 'linux-centos-x64' }}
with:
java-version: '15'
java-version: '17'
architecture: ${{ matrix.arch }}
- name: Setup Cl
@@ -71,7 +71,7 @@ jobs:
- name: Build rpm Package
if: ${{ matrix.runtime == 'linux-centos-x64' }}
uses: Syer10/CentOS-Java15-Action@v1
uses: Syer10/CentOS-Java17-Action@v1
with:
command: ./gradlew ${{ matrix.build }} --stacktrace

View File

@@ -9,10 +9,10 @@ import org.jmailen.gradle.kotlinter.tasks.FormatTask
import org.jmailen.gradle.kotlinter.tasks.LintTask
plugins {
kotlin("jvm") version "1.5.31"
kotlin("kapt") version "1.5.31"
kotlin("plugin.serialization") version "1.5.31"
id("org.jetbrains.compose") version "1.0.0"
kotlin("jvm") version "1.6.10"
kotlin("kapt") version "1.6.10"
kotlin("plugin.serialization") version "1.6.10"
id("org.jetbrains.compose") version "1.0.1-rc2"
id("com.github.gmazzo.buildconfig") version "3.0.3"
id("org.jmailen.kotlinter") version "3.7.0"
id("com.github.ben-manes.versions") version "0.39.0"
@@ -60,7 +60,7 @@ dependencies {
kapt("com.github.stephanenicolas.toothpick:toothpick-compiler:$toothpickVersion")
// Http client
val ktorVersion = "1.6.5"
val ktorVersion = "1.6.7"
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
implementation("io.ktor:ktor-client-serialization:$ktorVersion")
@@ -72,11 +72,11 @@ dependencies {
val slf4jVersion = "1.7.32"
implementation("org.slf4j:slf4j-api:$slf4jVersion")
implementation("org.slf4j:jul-to-slf4j:$slf4jVersion")
val log4jVersion = "2.14.1"
val log4jVersion = "2.16.0"
implementation("org.apache.logging.log4j:log4j-api:$log4jVersion")
implementation("org.apache.logging.log4j:log4j-core:$log4jVersion")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion")
implementation("io.github.microutils:kotlin-logging-jvm:2.1.0")
implementation("io.github.microutils:kotlin-logging-jvm:2.1.16")
// User storage
implementation("net.harawata:appdirs:1.2.1")

View File

@@ -10,5 +10,5 @@ object Config {
const val preview = true
const val previewCommit = "63ea28a620cdf6a2fd376304ad4e54e850e4f981"
val jvmTarget = JavaVersion.VERSION_15
val jvmTarget = JavaVersion.VERSION_17
}

View File

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

View File

@@ -34,7 +34,7 @@ sealed class ServerHostPreference<T : Any> {
const val argPrefix = "-Dsuwayomi.tachidesk.config.server."
}
open class StringServerHostPreference(
sealed class StringServerHostPreference(
override val preferenceStore: PreferenceStore,
override val propertyName: String,
override val defaultValue: String,
@@ -44,7 +44,7 @@ sealed class ServerHostPreference<T : Any> {
return preferenceStore.getString(propertyName, defaultValue)
}
}
open class IntServerHostPreference(
sealed class IntServerHostPreference(
override val preferenceStore: PreferenceStore,
override val propertyName: String,
override val defaultValue: Int,
@@ -54,7 +54,7 @@ sealed class ServerHostPreference<T : Any> {
return preferenceStore.getInt(propertyName, defaultValue)
}
}
open class BooleanServerHostPreference(
sealed class BooleanServerHostPreference(
override val preferenceStore: PreferenceStore,
override val propertyName: String,
override val defaultValue: Boolean,

View File

@@ -7,11 +7,11 @@
package ca.gosyer.ui.main.components
import ca.gosyer.ui.base.vm.ViewModel
import ca.gosyer.util.lang.milliseconds
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch
import javax.inject.Inject
import kotlin.time.Duration.Companion.milliseconds
class DebugOverlayViewModel @Inject constructor() : ViewModel() {
val runtime: Runtime = Runtime.getRuntime()

View File

@@ -46,9 +46,9 @@ import ca.gosyer.data.models.MangaMeta
import ca.gosyer.ui.base.components.Spinner
import ca.gosyer.ui.base.resources.stringResource
import ca.gosyer.ui.reader.model.ReaderChapter
import ca.gosyer.util.lang.milliseconds
import ca.gosyer.util.system.kLogger
import kotlin.math.roundToInt
import kotlin.time.Duration.Companion.milliseconds
private val logger = kLogger {}

View File

@@ -76,7 +76,6 @@ fun SourceSettingsMenu(sourceId: Long, menuController: MenuController? = LocalMe
is MultiSelect -> {
MultiSelectPreference(it)
}
else -> Unit
}
}
}

View File

@@ -31,7 +31,7 @@ sealed class SourceSettingsView<T, R : Any?> {
open val summary: String?
get() = subtitle?.let { withFormat(it, state.value) }
abstract class TwoState(
sealed class TwoState(
props: TwoStateProps,
private val _state: MutableStateFlow<Boolean> = MutableStateFlow(
props.currentValue

View File

@@ -1,32 +0,0 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package ca.gosyer.util.lang
import kotlin.time.DurationUnit
import kotlin.time.toDuration
val Int.nanoseconds get() = toDuration(DurationUnit.NANOSECONDS)
val Long.nanoseconds get() = toDuration(DurationUnit.NANOSECONDS)
val Double.nanoseconds get() = toDuration(DurationUnit.NANOSECONDS)
val Int.microseconds get() = toDuration(DurationUnit.MICROSECONDS)
val Long.microseconds get() = toDuration(DurationUnit.MICROSECONDS)
val Double.microseconds get() = toDuration(DurationUnit.MICROSECONDS)
val Int.milliseconds get() = toDuration(DurationUnit.MILLISECONDS)
val Long.milliseconds get() = toDuration(DurationUnit.MILLISECONDS)
val Double.milliseconds get() = toDuration(DurationUnit.MILLISECONDS)
val Int.seconds get() = toDuration(DurationUnit.SECONDS)
val Long.seconds get() = toDuration(DurationUnit.SECONDS)
val Double.seconds get() = toDuration(DurationUnit.SECONDS)
val Int.minutes get() = toDuration(DurationUnit.MINUTES)
val Long.minutes get() = toDuration(DurationUnit.MINUTES)
val Double.minutes get() = toDuration(DurationUnit.MINUTES)
val Int.hours get() = toDuration(DurationUnit.HOURS)
val Long.hours get() = toDuration(DurationUnit.HOURS)
val Double.hours get() = toDuration(DurationUnit.HOURS)
val Int.days get() = toDuration(DurationUnit.DAYS)
val Long.days get() = toDuration(DurationUnit.DAYS)
val Double.days get() = toDuration(DurationUnit.DAYS)