Upgrade to Kotlin 1.9.0, kotlinx-html 0.9.1, version 1.1.1.
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.7.20"
|
||||
kotlin("multiplatform") version "1.9.0"
|
||||
`maven-publish`
|
||||
signing
|
||||
id("org.jetbrains.dokka") version "1.5.31"
|
||||
}
|
||||
|
||||
group = "nl.astraeus"
|
||||
version = "1.0.8-SNAPSHOT"
|
||||
version = "1.1.1"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
js(BOTH) {
|
||||
js(IR) {
|
||||
browser {
|
||||
testTask {
|
||||
useKarma {
|
||||
@@ -26,14 +26,11 @@ kotlin {
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-common"))
|
||||
|
||||
api("org.jetbrains.kotlinx:kotlinx-html:0.7.5")
|
||||
api("org.jetbrains.kotlinx:kotlinx-html:0.9.1")
|
||||
}
|
||||
}
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-js"))
|
||||
}
|
||||
}
|
||||
val jsTest by getting {
|
||||
@@ -71,25 +68,25 @@ publishing {
|
||||
maven {
|
||||
name = "releases"
|
||||
// change to point to your repo, e.g. http://my.org/repo
|
||||
setUrl("https://nexus.astraeus.nl/nexus/content/repositories/releases")
|
||||
setUrl("https://reposilite.astraeus.nl/releases")
|
||||
credentials {
|
||||
val nexusUsername: String? by project
|
||||
val nexusPassword: String? by project
|
||||
val reposiliteUsername: String? by project
|
||||
val reposilitePassword: String? by project
|
||||
|
||||
username = nexusUsername
|
||||
password = nexusPassword
|
||||
username = reposiliteUsername
|
||||
password = reposilitePassword
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "snapshots"
|
||||
// change to point to your repo, e.g. http://my.org/repo
|
||||
setUrl("https://nexus.astraeus.nl/nexus/content/repositories/snapshots")
|
||||
setUrl("https://reposilite.astraeus.nl/snapshots")
|
||||
credentials {
|
||||
val nexusUsername: String? by project
|
||||
val nexusPassword: String? by project
|
||||
val reposiliteUsername: String? by project
|
||||
val reposilitePassword: String? by project
|
||||
|
||||
username = nexusUsername
|
||||
password = nexusPassword
|
||||
username = reposiliteUsername
|
||||
password = reposilitePassword
|
||||
}
|
||||
}
|
||||
maven {
|
||||
@@ -136,3 +133,20 @@ publishing {
|
||||
signing {
|
||||
sign(publishing.publications)
|
||||
}
|
||||
|
||||
tasks.named<Task>("signJsPublication") {
|
||||
dependsOn(tasks.named<Task>("publishKotlinMultiplatformPublicationToMavenLocal"))
|
||||
}
|
||||
|
||||
tasks.named<Task>("publishJsPublicationToReleasesRepository") {
|
||||
dependsOn(tasks.named<Task>("signKotlinMultiplatformPublication"))
|
||||
}
|
||||
|
||||
tasks.named<Task>("publishKotlinMultiplatformPublicationToMavenLocalRepository") {
|
||||
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||
}
|
||||
|
||||
tasks.named<Task>("publishKotlinMultiplatformPublicationToReleasesRepository") {
|
||||
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||
}
|
||||
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
#Wed Mar 04 13:29:12 CET 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package nl.astraeus.komp
|
||||
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.Element
|
||||
import org.w3c.dom.HTMLInputElement
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.events.EventListener
|
||||
import org.w3c.dom.get
|
||||
|
||||
private fun Int.asSpaces(): String {
|
||||
|
||||
@@ -7,13 +7,13 @@ import kotlinx.html.FlowOrMetaDataOrPhrasingContent
|
||||
import kotlinx.html.Tag
|
||||
import kotlinx.html.TagConsumer
|
||||
import kotlinx.html.Unsafe
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.Element
|
||||
import org.w3c.dom.HTMLElement
|
||||
import org.w3c.dom.HTMLInputElement
|
||||
import org.w3c.dom.HTMLSpanElement
|
||||
import org.w3c.dom.Node
|
||||
import org.w3c.dom.asList
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.get
|
||||
|
||||
private var currentElement: Element? = null
|
||||
@@ -240,7 +240,7 @@ class HtmlBuilder(
|
||||
override fun onTagEvent(
|
||||
tag: Tag,
|
||||
event: String,
|
||||
value: (Event) -> Unit
|
||||
value: (kotlinx.html.org.w3c.dom.events.Event) -> Unit
|
||||
) {
|
||||
logReplace { "onTagEvent, ${tag.tagName} [$event, $value]" }
|
||||
|
||||
@@ -248,7 +248,7 @@ class HtmlBuilder(
|
||||
checkTag(tag)
|
||||
}
|
||||
|
||||
currentElement?.setKompEvent(event.toLowerCase(), value)
|
||||
currentElement?.setKompEvent(event.lowercase(), value.asDynamic())
|
||||
}
|
||||
|
||||
override fun onTagEnd(tag: Tag) {
|
||||
@@ -395,7 +395,7 @@ class HtmlBuilder(
|
||||
currentPosition.nextElement()
|
||||
}
|
||||
|
||||
override fun onTagError(tag: Tag, exception: Throwable) {
|
||||
fun onTagError(tag: Tag, exception: Throwable) {
|
||||
exceptionThrown = true
|
||||
|
||||
if (exception !is KomponentException) {
|
||||
|
||||
@@ -31,7 +31,7 @@ class MutableCollectionStateDelegate<T>(
|
||||
}
|
||||
|
||||
// todo: return iterator wrapper to update at changes?
|
||||
// override fun iterator(): MutableIterator<T> = collection.iterator()
|
||||
//override fun iterator(): MutableIterator<T> = collection.iterator()
|
||||
|
||||
override fun remove(element: T): Boolean {
|
||||
komponent.requestUpdate()
|
||||
|
||||
@@ -14,8 +14,8 @@ interface Delegate<T> {
|
||||
property: KProperty<*>,
|
||||
value: T
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
open class StateDelegate<T>(
|
||||
val komponent: Komponent,
|
||||
@@ -51,6 +51,6 @@ open class StateDelegate<T>(
|
||||
inline fun <reified T> Komponent.state(
|
||||
initialValue: T
|
||||
): Delegate<T> = StateDelegate(
|
||||
this,
|
||||
initialValue
|
||||
)
|
||||
this,
|
||||
initialValue
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user