Update to DF 0.4.2

This commit is contained in:
Alexander Nozik 2021-06-04 20:01:50 +03:00
parent bdbff04d78
commit fb3ff4d6fc
18 changed files with 24 additions and 22 deletions

View File

@ -7,8 +7,8 @@ plugins {
id("ru.mipt.npm.gradle.js") apply false id("ru.mipt.npm.gradle.js") apply false
} }
val dataforgeVersion by extra("0.4.1") val dataforgeVersion by extra("0.4.2")
val kotlinWrappersVersion by extra("pre.152-kotlin-1.4.32") val kotlinWrappersVersion by extra("pre.206-kotlin-1.5.10")
val fxVersion by extra("11") val fxVersion by extra("11")
allprojects { allprojects {
@ -17,12 +17,10 @@ allprojects {
jcenter() jcenter()
maven("https://repo.kotlin.link") maven("https://repo.kotlin.link")
maven("https://maven.jzy3d.org/releases") 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" group = "space.kscience"
version = "0.2.0-dev-17" version = "0.2.0-dev-18"
} }
subprojects { subprojects {

View File

@ -8,6 +8,7 @@ group = "ru.mipt.npm"
val ktorVersion: String = ru.mipt.npm.gradle.KScienceVersions.ktorVersion val ktorVersion: String = ru.mipt.npm.gradle.KScienceVersions.ktorVersion
kscience { kscience {
useCoroutines()
useSerialization() useSerialization()
application() application()
} }
@ -23,11 +24,9 @@ kotlin {
tasks.getByName<ProcessResources>("jvmProcessResources") { tasks.getByName<ProcessResources>("jvmProcessResources") {
dependsOn(jsBrowserDistribution) dependsOn(jsBrowserDistribution)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE duplicatesStrategy = DuplicatesStrategy.EXCLUDE
afterEvaluate {
from(jsBrowserDistribution) from(jsBrowserDistribution)
} }
} }
}
sourceSets { sourceSets {
commonMain { commonMain {
@ -58,8 +57,8 @@ application {
mainClass.set("ru.mipt.npm.muon.monitor.server.MMServerKt") mainClass.set("ru.mipt.npm.muon.monitor.server.MMServerKt")
} }
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile>(){ tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile>() {
kotlinOptions{ kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-Xir-property-lazy-initialization" freeCompilerArgs = freeCompilerArgs + "-Xir-property-lazy-initialization"
} }
} }

View File

@ -19,7 +19,6 @@ import io.ktor.routing.get
import io.ktor.serialization.json import io.ktor.serialization.json
import io.ktor.server.cio.CIO import io.ktor.server.cio.CIO
import io.ktor.server.engine.embeddedServer import io.ktor.server.engine.embeddedServer
import io.ktor.util.KtorExperimentalAPI
import org.apache.commons.math3.random.JDKRandomGenerator import org.apache.commons.math3.random.JDKRandomGenerator
import ru.mipt.npm.muon.monitor.Model import ru.mipt.npm.muon.monitor.Model
import ru.mipt.npm.muon.monitor.sim.Cos2TrackGenerator import ru.mipt.npm.muon.monitor.sim.Cos2TrackGenerator
@ -69,7 +68,6 @@ fun Application.module(context: Context = Global) {
} }
} }
@OptIn(KtorExperimentalAPI::class)
fun main() { fun main() {
embeddedServer(CIO, 8080, host = "localhost", module = Application::module).start(wait = true) embeddedServer(CIO, 8080, host = "localhost", module = Application::module).start(wait = true)
} }

View File

@ -1,6 +1,6 @@
pluginManagement { pluginManagement {
val kotlinVersion = "1.5.0" val kotlinVersion = "1.5.10"
val toolsVersion = "0.9.5" val toolsVersion = "0.9.10"
repositories { repositories {
maven("https://repo.kotlin.link") maven("https://repo.kotlin.link")

View File

@ -10,6 +10,7 @@ import org.w3c.dom.events.Event
import org.w3c.files.Blob import org.w3c.files.Blob
import org.w3c.files.BlobPropertyBag import org.w3c.files.BlobPropertyBag
import react.* import react.*
import react.dom.attrs
import react.dom.button import react.dom.button
import space.kscience.dataforge.meta.withDefault import space.kscience.dataforge.meta.withDefault
import space.kscience.visionforge.react.flexColumn import space.kscience.visionforge.react.flexColumn

View File

@ -4,6 +4,7 @@ import kotlinx.html.DIV
import kotlinx.html.classes import kotlinx.html.classes
import kotlinx.html.js.onClickFunction import kotlinx.html.js.onClickFunction
import react.* import react.*
import react.dom.attrs
import react.dom.button import react.dom.button
import react.dom.li import react.dom.li
import react.dom.ul import react.dom.ul

View File

@ -6,8 +6,8 @@ val kotlinWrappersVersion: String by rootProject.extra
dependencies{ dependencies{
api(project(":visionforge-solid")) api(project(":visionforge-solid"))
api("org.jetbrains:kotlin-styled:5.2.3-$kotlinWrappersVersion") api("org.jetbrains.kotlin-wrappers:kotlin-styled:5.3.0-$kotlinWrappersVersion")
api("org.jetbrains:kotlin-react-dom:17.0.2-$kotlinWrappersVersion") api("org.jetbrains.kotlin-wrappers:kotlin-react-dom:17.0.2-$kotlinWrappersVersion")
// implementation(npm("react-select","4.3.0")) // implementation(npm("react-select","4.3.0"))
implementation(project(":visionforge-threejs")) implementation(project(":visionforge-threejs"))
} }

View File

@ -4,6 +4,7 @@ import kotlinx.html.js.onClickFunction
import org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.* import react.*
import react.dom.a import react.dom.a
import react.dom.attrs
import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.Meta
import space.kscience.dataforge.meta.MetaItemNode import space.kscience.dataforge.meta.MetaItemNode
import space.kscience.dataforge.meta.MetaItemValue import space.kscience.dataforge.meta.MetaItemValue

View File

@ -6,6 +6,7 @@ import org.w3c.dom.HTMLSelectElement
import org.w3c.dom.asList import org.w3c.dom.asList
import org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.FunctionalComponent import react.FunctionalComponent
import react.dom.attrs
import react.dom.option import react.dom.option
import react.dom.select import react.dom.select
import react.functionalComponent import react.functionalComponent

View File

@ -3,6 +3,7 @@ package space.kscience.visionforge.react
import kotlinx.html.js.onClickFunction import kotlinx.html.js.onClickFunction
import org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.* import react.*
import react.dom.attrs
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.lastOrNull import space.kscience.dataforge.names.lastOrNull
import space.kscience.dataforge.names.plus import space.kscience.dataforge.names.plus

View File

@ -13,6 +13,7 @@ import kotlinx.html.js.onClickFunction
import org.w3c.dom.Element import org.w3c.dom.Element
import org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.* import react.*
import react.dom.attrs
import react.dom.render import react.dom.render
import space.kscience.dataforge.meta.* import space.kscience.dataforge.meta.*
import space.kscience.dataforge.meta.descriptors.ItemDescriptor import space.kscience.dataforge.meta.descriptors.ItemDescriptor

View File

@ -5,6 +5,7 @@ import kotlinx.html.js.onChangeFunction
import org.w3c.dom.HTMLInputElement import org.w3c.dom.HTMLInputElement
import org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.FunctionalComponent import react.FunctionalComponent
import react.dom.attrs
import react.functionalComponent import react.functionalComponent
import react.useState import react.useState
import space.kscience.dataforge.meta.get import space.kscience.dataforge.meta.get

View File

@ -33,7 +33,7 @@ public external interface ThreeCanvasState : RState {
public val ThreeCanvasComponent: FunctionalComponent<ThreeCanvasProps> = functionalComponent( public val ThreeCanvasComponent: FunctionalComponent<ThreeCanvasProps> = functionalComponent(
"ThreeCanvasComponent" "ThreeCanvasComponent"
) { props -> ) { props ->
val elementRef = useRef<Element?>(null) val elementRef = useRef<Element>(null)
var canvas by useState<ThreeCanvas?>(null) var canvas by useState<ThreeCanvas?>(null)
val three: ThreePlugin = useMemo({props.context.fetch(ThreePlugin)}, arrayOf(props.context)) val three: ThreePlugin = useMemo({props.context.fetch(ThreePlugin)}, arrayOf(props.context))

View File

@ -7,6 +7,7 @@ import org.w3c.dom.HTMLInputElement
import org.w3c.dom.HTMLSelectElement import org.w3c.dom.HTMLSelectElement
import org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.* import react.*
import react.dom.attrs
import react.dom.option import react.dom.option
import space.kscience.dataforge.meta.* import space.kscience.dataforge.meta.*
import space.kscience.dataforge.meta.descriptors.ValueDescriptor import space.kscience.dataforge.meta.descriptors.ValueDescriptor

View File

@ -7,6 +7,7 @@ import org.w3c.dom.events.Event
import org.w3c.files.Blob import org.w3c.files.Blob
import org.w3c.files.BlobPropertyBag import org.w3c.files.BlobPropertyBag
import react.* import react.*
import react.dom.attrs
import react.dom.button import react.dom.button
import react.dom.h2 import react.dom.h2
import ringui.island.ringIsland import ringui.island.ringIsland

View File

@ -15,12 +15,12 @@ kotlin {
dependencies { dependencies {
api("space.kscience:dataforge-context:$dataforgeVersion") api("space.kscience:dataforge-context:$dataforgeVersion")
api("org.jetbrains.kotlinx:kotlinx-html:${ru.mipt.npm.gradle.KScienceVersions.htmlVersion}") 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 { jsMain {
dependencies { dependencies {
api("org.jetbrains:kotlin-extensions:1.0.1-$kotlinWrappersVersion") api("org.jetbrains.kotlin-wrappers:kotlin-extensions:1.0.1-$kotlinWrappersVersion")
} }
} }
} }

View File

@ -2,7 +2,7 @@ plugins {
id("ru.mipt.npm.gradle.mpp") id("ru.mipt.npm.gradle.mpp")
} }
val plotlyVersion = "0.4.0-dev-1" val plotlyVersion = "0.4.2"
kscience { kscience {
useSerialization() useSerialization()

View File

@ -16,7 +16,6 @@ import io.ktor.routing.*
import io.ktor.server.cio.CIO import io.ktor.server.cio.CIO
import io.ktor.server.engine.ApplicationEngine import io.ktor.server.engine.ApplicationEngine
import io.ktor.server.engine.embeddedServer import io.ktor.server.engine.embeddedServer
import io.ktor.util.KtorExperimentalAPI
import io.ktor.websocket.WebSockets import io.ktor.websocket.WebSockets
import io.ktor.websocket.webSocket import io.ktor.websocket.webSocket
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
@ -283,7 +282,6 @@ public fun Application.visionServer(context: Context, route: String = DEFAULT_PA
return VisionServer(visionManager, this, route) return VisionServer(visionManager, this, route)
} }
@OptIn(KtorExperimentalAPI::class)
public fun VisionManager.serve( public fun VisionManager.serve(
host: String = "localhost", host: String = "localhost",
port: Int = 7777, port: Int = 7777,