From fb3ff4d6fc5fdc2cde373762f1b45c438a1d245e Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 4 Jun 2021 20:01:50 +0300 Subject: [PATCH] Update to DF 0.4.2 --- build.gradle.kts | 8 +++----- demo/muon-monitor/build.gradle.kts | 9 ++++----- .../kotlin/ru/mipt/npm/muon/monitor/server/MMServer.kt | 2 -- settings.gradle.kts | 4 ++-- .../space/kscience/visionforge/bootstrap/outputConfig.kt | 1 + .../space/kscience/visionforge/bootstrap/tabComponent.kt | 1 + ui/react/build.gradle.kts | 4 ++-- .../space/kscience/visionforge/react/MetaViewer.kt | 1 + .../kscience/visionforge/react/MultiSelectChooser.kt | 1 + .../space/kscience/visionforge/react/ObjectTree.kt | 1 + .../space/kscience/visionforge/react/PropertyEditor.kt | 1 + .../kscience/visionforge/react/RangeValueChooser.kt | 1 + .../kscience/visionforge/react/ThreeCanvasComponent.kt | 2 +- .../space/kscience/visionforge/react/valueChooser.kt | 1 + .../space.kscience.visionforge.ring/ringThreeControls.kt | 1 + visionforge-core/build.gradle.kts | 4 ++-- visionforge-plotly/build.gradle.kts | 2 +- .../kscience/visionforge/three/server/VisionServer.kt | 2 -- 18 files changed, 24 insertions(+), 22 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 65e355ac..9fd660c8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,8 +7,8 @@ plugins { id("ru.mipt.npm.gradle.js") apply false } -val dataforgeVersion by extra("0.4.1") -val kotlinWrappersVersion by extra("pre.152-kotlin-1.4.32") +val dataforgeVersion by extra("0.4.2") +val kotlinWrappersVersion by extra("pre.206-kotlin-1.5.10") val fxVersion by extra("11") allprojects { @@ -17,12 +17,10 @@ allprojects { jcenter() maven("https://repo.kotlin.link") maven("https://maven.jzy3d.org/releases") - maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers") - maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") } group = "space.kscience" - version = "0.2.0-dev-17" + version = "0.2.0-dev-18" } subprojects { diff --git a/demo/muon-monitor/build.gradle.kts b/demo/muon-monitor/build.gradle.kts index 3fe03042..3a8035ab 100644 --- a/demo/muon-monitor/build.gradle.kts +++ b/demo/muon-monitor/build.gradle.kts @@ -8,6 +8,7 @@ group = "ru.mipt.npm" val ktorVersion: String = ru.mipt.npm.gradle.KScienceVersions.ktorVersion kscience { + useCoroutines() useSerialization() application() } @@ -23,9 +24,7 @@ kotlin { tasks.getByName("jvmProcessResources") { dependsOn(jsBrowserDistribution) duplicatesStrategy = DuplicatesStrategy.EXCLUDE - afterEvaluate { - from(jsBrowserDistribution) - } + from(jsBrowserDistribution) } } @@ -58,8 +57,8 @@ application { mainClass.set("ru.mipt.npm.muon.monitor.server.MMServerKt") } -tasks.withType(){ - kotlinOptions{ +tasks.withType() { + kotlinOptions { freeCompilerArgs = freeCompilerArgs + "-Xir-property-lazy-initialization" } } diff --git a/demo/muon-monitor/src/jvmMain/kotlin/ru/mipt/npm/muon/monitor/server/MMServer.kt b/demo/muon-monitor/src/jvmMain/kotlin/ru/mipt/npm/muon/monitor/server/MMServer.kt index 336264e2..d22a762d 100644 --- a/demo/muon-monitor/src/jvmMain/kotlin/ru/mipt/npm/muon/monitor/server/MMServer.kt +++ b/demo/muon-monitor/src/jvmMain/kotlin/ru/mipt/npm/muon/monitor/server/MMServer.kt @@ -19,7 +19,6 @@ import io.ktor.routing.get import io.ktor.serialization.json import io.ktor.server.cio.CIO import io.ktor.server.engine.embeddedServer -import io.ktor.util.KtorExperimentalAPI import org.apache.commons.math3.random.JDKRandomGenerator import ru.mipt.npm.muon.monitor.Model import ru.mipt.npm.muon.monitor.sim.Cos2TrackGenerator @@ -69,7 +68,6 @@ fun Application.module(context: Context = Global) { } } -@OptIn(KtorExperimentalAPI::class) fun main() { embeddedServer(CIO, 8080, host = "localhost", module = Application::module).start(wait = true) } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 11152323..8c2170f6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,6 @@ pluginManagement { - val kotlinVersion = "1.5.0" - val toolsVersion = "0.9.5" + val kotlinVersion = "1.5.10" + val toolsVersion = "0.9.10" repositories { maven("https://repo.kotlin.link") diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt b/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt index accc68e2..2edbaab8 100644 --- a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt +++ b/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt @@ -10,6 +10,7 @@ import org.w3c.dom.events.Event import org.w3c.files.Blob import org.w3c.files.BlobPropertyBag import react.* +import react.dom.attrs import react.dom.button import space.kscience.dataforge.meta.withDefault import space.kscience.visionforge.react.flexColumn diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt b/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt index 1f29be59..5ff0d5e8 100644 --- a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt +++ b/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt @@ -4,6 +4,7 @@ import kotlinx.html.DIV import kotlinx.html.classes import kotlinx.html.js.onClickFunction import react.* +import react.dom.attrs import react.dom.button import react.dom.li import react.dom.ul diff --git a/ui/react/build.gradle.kts b/ui/react/build.gradle.kts index f20a63b8..151b92fe 100644 --- a/ui/react/build.gradle.kts +++ b/ui/react/build.gradle.kts @@ -6,8 +6,8 @@ val kotlinWrappersVersion: String by rootProject.extra dependencies{ api(project(":visionforge-solid")) - api("org.jetbrains:kotlin-styled:5.2.3-$kotlinWrappersVersion") - api("org.jetbrains:kotlin-react-dom:17.0.2-$kotlinWrappersVersion") + api("org.jetbrains.kotlin-wrappers:kotlin-styled:5.3.0-$kotlinWrappersVersion") + api("org.jetbrains.kotlin-wrappers:kotlin-react-dom:17.0.2-$kotlinWrappersVersion") // implementation(npm("react-select","4.3.0")) implementation(project(":visionforge-threejs")) } \ No newline at end of file diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt index 58e651d8..f7de3070 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt @@ -4,6 +4,7 @@ import kotlinx.html.js.onClickFunction import org.w3c.dom.events.Event import react.* import react.dom.a +import react.dom.attrs import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.MetaItemNode import space.kscience.dataforge.meta.MetaItemValue diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt index 497256c8..a363fcd5 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt @@ -6,6 +6,7 @@ import org.w3c.dom.HTMLSelectElement import org.w3c.dom.asList import org.w3c.dom.events.Event import react.FunctionalComponent +import react.dom.attrs import react.dom.option import react.dom.select import react.functionalComponent diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/ObjectTree.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/ObjectTree.kt index d4d295c1..e7e7dd06 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/ObjectTree.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/ObjectTree.kt @@ -3,6 +3,7 @@ package space.kscience.visionforge.react import kotlinx.html.js.onClickFunction import org.w3c.dom.events.Event import react.* +import react.dom.attrs import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.lastOrNull import space.kscience.dataforge.names.plus diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt index 8052d576..5bb69714 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt @@ -13,6 +13,7 @@ import kotlinx.html.js.onClickFunction import org.w3c.dom.Element import org.w3c.dom.events.Event import react.* +import react.dom.attrs import react.dom.render import space.kscience.dataforge.meta.* import space.kscience.dataforge.meta.descriptors.ItemDescriptor diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt index 5ad257c8..6361ecfb 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt @@ -5,6 +5,7 @@ import kotlinx.html.js.onChangeFunction import org.w3c.dom.HTMLInputElement import org.w3c.dom.events.Event import react.FunctionalComponent +import react.dom.attrs import react.functionalComponent import react.useState import space.kscience.dataforge.meta.get diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt index 7446acce..4f645bf6 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt @@ -33,7 +33,7 @@ public external interface ThreeCanvasState : RState { public val ThreeCanvasComponent: FunctionalComponent = functionalComponent( "ThreeCanvasComponent" ) { props -> - val elementRef = useRef(null) + val elementRef = useRef(null) var canvas by useState(null) val three: ThreePlugin = useMemo({props.context.fetch(ThreePlugin)}, arrayOf(props.context)) diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt index 7a4960c1..5cfd8651 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt @@ -7,6 +7,7 @@ import org.w3c.dom.HTMLInputElement import org.w3c.dom.HTMLSelectElement import org.w3c.dom.events.Event import react.* +import react.dom.attrs import react.dom.option import space.kscience.dataforge.meta.* import space.kscience.dataforge.meta.descriptors.ValueDescriptor diff --git a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt b/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt index 431fc2d6..1a0d101c 100644 --- a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt +++ b/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt @@ -7,6 +7,7 @@ import org.w3c.dom.events.Event import org.w3c.files.Blob import org.w3c.files.BlobPropertyBag import react.* +import react.dom.attrs import react.dom.button import react.dom.h2 import ringui.island.ringIsland diff --git a/visionforge-core/build.gradle.kts b/visionforge-core/build.gradle.kts index 89a3b693..92c0bdd6 100644 --- a/visionforge-core/build.gradle.kts +++ b/visionforge-core/build.gradle.kts @@ -15,12 +15,12 @@ kotlin { dependencies { api("space.kscience:dataforge-context:$dataforgeVersion") api("org.jetbrains.kotlinx:kotlinx-html:${ru.mipt.npm.gradle.KScienceVersions.htmlVersion}") - api("org.jetbrains:kotlin-css:1.0.0-$kotlinWrappersVersion") + api("org.jetbrains.kotlin-wrappers:kotlin-css:1.0.0-$kotlinWrappersVersion") } } jsMain { dependencies { - api("org.jetbrains:kotlin-extensions:1.0.1-$kotlinWrappersVersion") + api("org.jetbrains.kotlin-wrappers:kotlin-extensions:1.0.1-$kotlinWrappersVersion") } } } diff --git a/visionforge-plotly/build.gradle.kts b/visionforge-plotly/build.gradle.kts index 9844b470..ea0aa763 100644 --- a/visionforge-plotly/build.gradle.kts +++ b/visionforge-plotly/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("ru.mipt.npm.gradle.mpp") } -val plotlyVersion = "0.4.0-dev-1" +val plotlyVersion = "0.4.2" kscience { useSerialization() diff --git a/visionforge-server/src/main/kotlin/space/kscience/visionforge/three/server/VisionServer.kt b/visionforge-server/src/main/kotlin/space/kscience/visionforge/three/server/VisionServer.kt index 06c13bfe..1c398e74 100644 --- a/visionforge-server/src/main/kotlin/space/kscience/visionforge/three/server/VisionServer.kt +++ b/visionforge-server/src/main/kotlin/space/kscience/visionforge/three/server/VisionServer.kt @@ -16,7 +16,6 @@ import io.ktor.routing.* import io.ktor.server.cio.CIO import io.ktor.server.engine.ApplicationEngine import io.ktor.server.engine.embeddedServer -import io.ktor.util.KtorExperimentalAPI import io.ktor.websocket.WebSockets import io.ktor.websocket.webSocket import kotlinx.coroutines.CoroutineScope @@ -283,7 +282,6 @@ public fun Application.visionServer(context: Context, route: String = DEFAULT_PA return VisionServer(visionManager, this, route) } -@OptIn(KtorExperimentalAPI::class) public fun VisionManager.serve( host: String = "localhost", port: Int = 7777,