Migrate to com.vanniktech.maven.publish publish plugin, update gradle, publish to maven central.
This commit is contained in:
@@ -10,51 +10,60 @@ plugins {
|
||||
}
|
||||
|
||||
group = "nl.astraeus"
|
||||
version = "1.2.5-SNAPSHOT"
|
||||
version = "1.2.5"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
/*
|
||||
tasks.withType<Test>(Test::class.java) {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
*/
|
||||
|
||||
kotlin {
|
||||
js {
|
||||
browser {
|
||||
testTask {
|
||||
useKarma {
|
||||
useChromiumHeadless()
|
||||
useChromeHeadless()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
wasmJs {
|
||||
//moduleName = project.name
|
||||
browser()
|
||||
/* wasmJs {
|
||||
//moduleName = project.name
|
||||
browser()
|
||||
|
||||
mavenPublication {
|
||||
groupId = group as String
|
||||
pom { name = "${project.name}-wasm-js" }
|
||||
}
|
||||
}
|
||||
*/
|
||||
mavenPublication {
|
||||
groupId = group as String
|
||||
pom { name = "${project.name}-wasm-js" }
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
applyDefaultHierarchyTemplate {
|
||||
common {
|
||||
group("jsCommon") {
|
||||
withJs()
|
||||
// TODO: switch to `withWasmJs()` after upgrade to Kotlin 2.0
|
||||
withWasm()
|
||||
/*
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
applyDefaultHierarchyTemplate {
|
||||
common {
|
||||
group("jsCommon") {
|
||||
withJs()
|
||||
// TODO: switch to `withWasmJs()` after upgrade to Kotlin 2.0
|
||||
withWasm()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
api("org.jetbrains.kotlinx:kotlinx-html:0.11.0")
|
||||
api("org.jetbrains.kotlinx:kotlinx-html:0.12.0")
|
||||
}
|
||||
}
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
}
|
||||
}
|
||||
val jsMain by getting
|
||||
@@ -128,8 +137,8 @@ publishing {
|
||||
setUrl("https://gitea.astraeus.nl/api/packages/rnentjes/maven")
|
||||
|
||||
credentials() {
|
||||
val giteaUsername: kotlin.String? by project
|
||||
val giteaPassword: kotlin.String? by project
|
||||
val giteaUsername: String? by project
|
||||
val giteaPassword: String? by project
|
||||
|
||||
username = giteaUsername
|
||||
password = giteaPassword
|
||||
@@ -175,3 +184,7 @@ tasks.withType<AbstractPublishToMaven> {
|
||||
signing {
|
||||
sign(publishing.publications)
|
||||
}
|
||||
|
||||
tasks.withType<PublishToMavenRepository> {
|
||||
dependsOn(tasks.withType<Sign>())
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ interface HtmlConsumer : TagConsumer<Element> {
|
||||
fun FlowOrMetaDataOrPhrasingContent.currentElement(): Element =
|
||||
currentElement ?: error("No current element defined!")
|
||||
|
||||
private fun Node.asElement() = this as? HTMLElement
|
||||
private fun Node?.asElement() = this as? HTMLElement
|
||||
|
||||
class HtmlBuilder(
|
||||
private val komponent: Komponent?,
|
||||
|
||||
@@ -191,6 +191,7 @@ abstract class Komponent {
|
||||
private var scheduledForUpdate = mutableSetOf<Komponent>()
|
||||
private var interceptor: (Komponent, () -> Unit) -> Unit = { _, block -> block() }
|
||||
|
||||
var logUpdateEvent = false
|
||||
var logRenderEvent = false
|
||||
var logReplaceEvent = false
|
||||
var enableAssertions = false
|
||||
@@ -244,6 +245,9 @@ abstract class Komponent {
|
||||
val memoizeHash = next.generateMemoizeHash()
|
||||
|
||||
if (next.memoizeChanged()) {
|
||||
if (logUpdateEvent) {
|
||||
console.log("Rendering", next)
|
||||
}
|
||||
next.onBeforeUpdate()
|
||||
next.renderUpdate()
|
||||
next.updateMemoizeHash()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package nl.astraeus.komp
|
||||
|
||||
import kotlinx.browser.document
|
||||
import kotlinx.html.DIV
|
||||
import kotlinx.html.InputType
|
||||
import kotlinx.html.classes
|
||||
import kotlinx.html.div
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package nl.astraeus.komp
|
||||
|
||||
import org.w3c.dom.AddEventListenerOptions
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.Element
|
||||
import org.w3c.dom.HTMLInputElement
|
||||
import org.w3c.dom.events.EventListener
|
||||
import org.w3c.dom.events.Event
|
||||
import org.w3c.dom.get
|
||||
|
||||
private fun Int.asSpaces(): String {
|
||||
|
||||
Reference in New Issue
Block a user