Upgrade to Gradle 8.10, Kotlin 2.0.20, reduce warnings
This commit is contained in:
@@ -5,7 +5,9 @@ plugins {
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn")
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
@@ -88,7 +88,7 @@ fun Element.div(vararg classes: String, init: Div.() -> Unit): Div {
|
||||
}
|
||||
|
||||
inline fun <reified T : TextElement> Element.textElement(classes: Array<out String>, init: T.() -> String): T {
|
||||
val te = T::class.java.newInstance()
|
||||
@Suppress("DEPRECATION") val te = T::class.java.newInstance()
|
||||
te.classes.addAll(classes.map { ElementClass(it) })
|
||||
te.text(te.init())
|
||||
append(te)
|
||||
|
||||
@@ -7,7 +7,7 @@ import kotlin.reflect.full.declaredMemberProperties
|
||||
fun watchHash(toHash: Any): Int {
|
||||
var hash = 0
|
||||
for (property in toHash::class.declaredMemberProperties) {
|
||||
val v = ((property as KProperty1<Any, Any?>).getter).invoke(toHash)
|
||||
@Suppress("UNCHECKED_CAST") val v = ((property as KProperty1<Any, Any?>).getter).invoke(toHash)
|
||||
if (v is KProperty0<*>) {
|
||||
val pv = v.get()
|
||||
hash = 31 * hash + (pv?.hashCode() ?: 0)
|
||||
|
||||
Reference in New Issue
Block a user