Change all Js modules to MPP

This commit is contained in:
Alexander Nozik 2023-06-02 20:58:32 +03:00
parent 23cb8765b6
commit 140c59497e
209 changed files with 36 additions and 30 deletions

View File

@ -34,8 +34,8 @@ kscience {
implementation("ch.qos.logback:logback-classic:1.2.11") implementation("ch.qos.logback:logback-classic:1.2.11")
} }
jsMain { jsMain {
implementation(project(":ui:ring")) implementation(projects.ui.ring)
implementation(project(":visionforge-threejs")) implementation(projects.visionforgeThreejs)
//implementation(devNpm("webpack-bundle-analyzer", "4.4.0")) //implementation(devNpm("webpack-bundle-analyzer", "4.4.0"))
} }
} }

View File

@ -6,5 +6,5 @@ kotlin.incremental.js.ir=true
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4G org.gradle.jvmargs=-Xmx4G
toolsVersion=0.14.9-kotlin-1.9.0-Beta toolsVersion=0.14.9-kotlin-1.9.0-Beta-2
org.jetbrains.compose.experimental.jscanvas.enabled=true org.jetbrains.compose.experimental.jscanvas.enabled=true

View File

@ -1,11 +1,16 @@
plugins { plugins {
id("space.kscience.gradle.js") id("space.kscience.gradle.mpp")
} }
dependencies{ kscience {
api(project(":visionforge-solid")) js()
api("org.jetbrains.kotlin-wrappers:kotlin-styled") jsMain {
api("org.jetbrains.kotlin-wrappers:kotlin-react-dom") dependencies {
api(projects.visionforgeSolid)
api("org.jetbrains.kotlin-wrappers:kotlin-styled")
api("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
// implementation(npm("react-select","4.3.0")) // implementation(npm("react-select","4.3.0"))
implementation(project(":visionforge-threejs")) implementation(projects.visionforgeThreejs)
}
}
} }

View File

@ -13,10 +13,13 @@ import kotlinx.html.js.onClickFunction
import kotlinx.html.org.w3c.dom.events.Event import kotlinx.html.org.w3c.dom.events.Event
import react.* import react.*
import react.dom.attrs import react.dom.attrs
import space.kscience.dataforge.meta.* import space.kscience.dataforge.meta.MutableMeta
import space.kscience.dataforge.meta.ObservableMutableMeta
import space.kscience.dataforge.meta.descriptors.MetaDescriptor import space.kscience.dataforge.meta.descriptors.MetaDescriptor
import space.kscience.dataforge.meta.descriptors.ValueRequirement import space.kscience.dataforge.meta.descriptors.ValueRequirement
import space.kscience.dataforge.meta.descriptors.get import space.kscience.dataforge.meta.descriptors.get
import space.kscience.dataforge.meta.get
import space.kscience.dataforge.meta.remove
import space.kscience.dataforge.names.* import space.kscience.dataforge.names.*
import space.kscience.visionforge.hidden import space.kscience.visionforge.hidden
import styled.css import styled.css

View File

@ -1,11 +1,11 @@
plugins { plugins {
id("space.kscience.gradle.js") id("space.kscience.gradle.mpp")
} }
val dataforgeVersion: String by rootProject.extra val dataforgeVersion: String by rootProject.extra
kotlin{ kscience{
js(IR){ js{
useCommonJs() useCommonJs()
browser { browser {
commonWebpackConfig { commonWebpackConfig {
@ -15,12 +15,11 @@ kotlin{
} }
} }
} }
} jsMain{
api(projects.ui.react)
api("org.jetbrains.kotlin-wrappers:kotlin-ring-ui")
dependencies{ implementation(npm("core-js","3.12.1"))
api(project(":ui:react")) implementation(npm("file-saver", "2.0.2"))
api("org.jetbrains.kotlin-wrappers:kotlin-ring-ui") }
implementation(npm("core-js","3.12.1"))
implementation(npm("file-saver", "2.0.2"))
} }

View File

@ -9,7 +9,7 @@ kscience {
} }
dependencies { dependencies {
api(projects.visionforgeSolid) api(projects.visionforgeSolid)
api("space.kscience:gdml:0.4.0") api("space.kscience:gdml:0.5.0")
} }
dependencies(jvmTest) { dependencies(jvmTest) {
implementation(spclibs.logback.classic) implementation(spclibs.logback.classic)

View File

@ -1,13 +1,13 @@
package space.kscience.visionforge.solid.three package space.kscience.visionforge.solid.three
import three.core.BufferGeometry
import three.core.Float32BufferAttribute
import three.math.Vector3
import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.Meta
import space.kscience.visionforge.solid.GeometryBuilder import space.kscience.visionforge.solid.GeometryBuilder
import space.kscience.visionforge.solid.Point3D import space.kscience.visionforge.solid.Point3D
import space.kscience.visionforge.solid.cross import space.kscience.visionforge.solid.cross
import space.kscience.visionforge.solid.minus import space.kscience.visionforge.solid.minus
import three.core.BufferGeometry
import three.core.Float32BufferAttribute
import three.math.Vector3
internal fun Point3D.toVector() = Vector3(x, y, z) internal fun Point3D.toVector() = Vector3(x, y, z)

View File

@ -1,7 +1,7 @@
package space.kscience.visionforge.solid.three package space.kscience.visionforge.solid.three
import three.core.Object3D
import space.kscience.visionforge.solid.SolidBase import space.kscience.visionforge.solid.SolidBase
import three.core.Object3D
/** /**
* A custom visual object that has its own Three.js renderer * A custom visual object that has its own Three.js renderer

View File

@ -1,15 +1,15 @@
package space.kscience.visionforge.solid.three package space.kscience.visionforge.solid.three
import three.core.BufferGeometry
import three.core.Object3D
import three.math.Color
import three.objects.LineSegments
import space.kscience.visionforge.onPropertyChange import space.kscience.visionforge.onPropertyChange
import space.kscience.visionforge.solid.PolyLine import space.kscience.visionforge.solid.PolyLine
import space.kscience.visionforge.solid.SolidMaterial import space.kscience.visionforge.solid.SolidMaterial
import space.kscience.visionforge.solid.color import space.kscience.visionforge.solid.color
import space.kscience.visionforge.solid.string import space.kscience.visionforge.solid.string
import space.kscience.visionforge.solid.three.ThreeMaterials.DEFAULT_LINE_COLOR import space.kscience.visionforge.solid.three.ThreeMaterials.DEFAULT_LINE_COLOR
import three.core.BufferGeometry
import three.core.Object3D
import three.math.Color
import three.objects.LineSegments
import kotlin.math.ceil import kotlin.math.ceil
import kotlin.reflect.KClass import kotlin.reflect.KClass

View File

@ -6,7 +6,6 @@ import org.w3c.dom.Element
import org.w3c.dom.HTMLElement import org.w3c.dom.HTMLElement
import space.kscience.dataforge.context.* import space.kscience.dataforge.context.*
import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.Meta
import space.kscience.dataforge.meta.update
import space.kscience.dataforge.names.* import space.kscience.dataforge.names.*
import space.kscience.visionforge.ElementVisionRenderer import space.kscience.visionforge.ElementVisionRenderer
import space.kscience.visionforge.Vision import space.kscience.visionforge.Vision

Some files were not shown because too many files have changed in this diff Show More