0.2.0 #71

Merged
altavir merged 139 commits from dev into master 2022-01-24 09:44:18 +03:00
5 changed files with 26 additions and 52 deletions
Showing only changes of commit bf5d47fd0e - Show all commits

View File

@ -29,9 +29,10 @@ kotlin {
jvm {
withJava()
compilations.all {
kotlinOptions{
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" + "-Xopt-in=kotlin.RequiresOptIn" + "-Xlambdas=indy"
freeCompilerArgs =
freeCompilerArgs + "-Xjvm-default=all" + "-Xopt-in=kotlin.RequiresOptIn" + "-Xlambdas=indy"
}
}
testRuns["test"].executionTask.configure {
@ -39,18 +40,6 @@ kotlin {
}
}
afterEvaluate {
val jsBrowserDistribution = tasks.getByName("jsBrowserDevelopmentExecutableDistribution")
tasks.getByName<ProcessResources>("jvmProcessResources") {
dependsOn(jsBrowserDistribution)
afterEvaluate {
from(jsBrowserDistribution)
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
@ -80,7 +69,16 @@ kotlin {
}
}
val processJupyterApiResources by tasks.getting(org.jetbrains.kotlinx.jupyter.api.plugin.tasks.JupyterApiResourcesTask::class){
val jsBrowserDistribution = tasks.getByName("jsBrowserDistribution")
tasks.getByName<ProcessResources>("jvmProcessResources") {
dependsOn(jsBrowserDistribution)
from(jsBrowserDistribution) {
exclude("**/*.js.map")
}
}
val processJupyterApiResources by tasks.getting(org.jetbrains.kotlinx.jupyter.api.plugin.tasks.JupyterApiResourcesTask::class) {
libraryProducers = listOf("space.kscience.visionforge.examples.VisionForgePlayGroundForJupyter")
}

View File

@ -3,10 +3,13 @@ plugins {
}
kotlin {
js{
binaries.library()
}
sourceSets {
val commonMain by getting {
commonMain{
dependencies {
api(project(":visionforge-solid"))
api(projects.visionforgeSolid)
api("space.kscience:gdml:0.4.0")
}
}

View File

@ -10,27 +10,7 @@ kscience {
kotlin {
js {
//binaries.library()
binaries.executable()
browser {
webpackTask {
outputFileName = "js/visionforge-markdown.js"
}
}
}
jvm {
val processResourcesTaskName =
compilations[org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.MAIN_COMPILATION_NAME]
.processResourcesTaskName
}
val jsBrowserDistribution by tasks.getting
tasks.getByName<ProcessResources>("jvmProcessResources") {
dependsOn(jsBrowserDistribution)
from(jsBrowserDistribution)
binaries.library()
}
sourceSets {

View File

@ -10,20 +10,7 @@ kscience {
kotlin {
js {
//binaries.library()
binaries.executable()
browser {
webpackTask {
this.outputFileName = "js/visionforge-three.js"
}
}
}
val jsBrowserDistribution by tasks.getting
tasks.getByName<ProcessResources>("jvmProcessResources") {
dependsOn(jsBrowserDistribution)
from(jsBrowserDistribution)
binaries.library()
}
sourceSets {

View File

@ -2,6 +2,12 @@ plugins {
id("ru.mipt.npm.gradle.js")
}
kotlin{
js{
binaries.library()
}
}
dependencies {
api(project(":visionforge-solid"))
implementation(npm("three", "0.130.1"))