diff --git a/build.gradle.kts b/build.gradle.kts index 56f17ce2..bd9d4875 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,9 +11,9 @@ 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-beta1" + id("org.jetbrains.compose") version "1.0.0-rc5" id("com.github.gmazzo.buildconfig") version "3.0.3" - id("org.jmailen.kotlinter") version "3.6.0" + id("org.jmailen.kotlinter") version "3.7.0" id("com.github.ben-manes.versions") version "0.39.0" } @@ -46,7 +46,7 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:$coroutinesVersion") // Json - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1") // Xml val xmlutilVersion = "0.83.0" @@ -59,7 +59,7 @@ dependencies { kapt("com.github.stephanenicolas.toothpick:toothpick-compiler:$toothpickVersion") // Http client - val ktorVersion = "1.6.4" + val ktorVersion = "1.6.5" implementation("io.ktor:ktor-client-core:$ktorVersion") implementation("io.ktor:ktor-client-okhttp:$ktorVersion") implementation("io.ktor:ktor-client-serialization:$ktorVersion") @@ -75,7 +75,7 @@ dependencies { 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.0.11") + implementation("io.github.microutils:kotlin-logging-jvm:2.1.0") // User storage implementation("net.harawata:appdirs:1.2.1") @@ -155,6 +155,18 @@ tasks { dependsOn(this@task) } } + withType { + rejectVersionIf { + isNonStable(candidate.version) && !isNonStable(currentVersion) + } + } +} + +fun isNonStable(version: String): Boolean { + val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) } + val regex = "^[0-9,.v-]+(-r)?$".toRegex() + val isStable = stableKeyword || regex.matches(version) + return isStable.not() } @@ -224,7 +236,7 @@ buildConfig { kotlinter { experimentalRules = true - disabledRules = arrayOf("experimental:argument-list-wrapping") + disabledRules = arrayOf("experimental:argument-list-wrapping", "experimental:trailing-comma") } kapt { diff --git a/src/main/kotlin/ca/gosyer/ui/base/components/DropdownIconButton.kt b/src/main/kotlin/ca/gosyer/ui/base/components/DropdownIconButton.kt index a06b1105..4220af6e 100644 --- a/src/main/kotlin/ca/gosyer/ui/base/components/DropdownIconButton.kt +++ b/src/main/kotlin/ca/gosyer/ui/base/components/DropdownIconButton.kt @@ -22,6 +22,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.awt.awtEvent import androidx.compose.ui.input.pointer.AwaitPointerEventScope import androidx.compose.ui.input.pointer.PointerEvent import androidx.compose.ui.input.pointer.changedToDown @@ -56,7 +57,7 @@ fun DropdownIconButton( .pointerInput(Unit) { forEachGesture { awaitPointerEventScope { - awaitEventFirstDown().mouseEvent?.let { + awaitEventFirstDown().awtEvent.let { offset = DpOffset(it.xOnScreen.dp, it.yOnScreen.dp) } } diff --git a/src/main/kotlin/ca/gosyer/ui/reader/navigation/NavigationClickable.kt b/src/main/kotlin/ca/gosyer/ui/reader/navigation/NavigationClickable.kt index dd44f0f8..3b4efb4a 100644 --- a/src/main/kotlin/ca/gosyer/ui/reader/navigation/NavigationClickable.kt +++ b/src/main/kotlin/ca/gosyer/ui/reader/navigation/NavigationClickable.kt @@ -83,7 +83,7 @@ fun Modifier.navigationClickable( .pointerInput(interactionSource) { forEachGesture { awaitPointerEventScope { - lastEvent = awaitEventFirstDown().mouseEvent + lastEvent = awaitEventFirstDown().awtEvent } } }