Work-around for strange dependency resolution in notebooks

This commit is contained in:
Alexander Nozik 2023-07-19 22:54:13 +03:00
parent 8b25761dc6
commit c1f275ce45
3 changed files with 48 additions and 43 deletions

View File

@ -3,45 +3,50 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"@file:Repository(\"*mavenLocal\")\n",
"@file:Repository(\"https://repo.kotlin.link\")\n",
"@file:Repository(\"https://maven.pkg.jetbrains.space/spc/p/sci/dev\")\n",
"@file:DependsOn(\"space.kscience:visionforge-jupyter-common-jvm:0.3.0-dev-11\")"
"@file:DependsOn(\"space.kscience:visionforge-jupyter-common-jvm:0.3.0-dev-11\")\n",
"@file:DependsOn(\"io.ktor:ktor-server-cio-jvm:2.3.0\")\n",
"@file:DependsOn(\"io.ktor:ktor-server-websockets-jvm:2.3.0\")\n",
"@file:DependsOn(\"io.ktor:ktor-server-cors-jvm:2.3.0\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
":classpath"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
"import io.ktor.server.cio.CIO\n",
"\n",
"println(CIO)\n",
"\n",
"vf.startServer()"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
"import space.kscience.visionforge.plotly.plotly\n",
"import space.kscience.plotly.*\n",
"import space.kscience.plotly.models.*\n",
"\n",
"vf.page {\n",
" h1 { +\"AAA\" }\n",
@ -65,19 +70,19 @@
" }\n",
" }\n",
"}"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
}
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": []
}
],
"metadata": {
@ -86,19 +91,19 @@
"language": "kotlin",
"name": "kotlin"
},
"language_info": {
"name": "kotlin",
"version": "1.8.20",
"mimetype": "text/x-kotlin",
"file_extension": ".kt",
"pygments_lexer": "kotlin",
"codemirror_mode": "text/x-kotlin",
"nbconvert_exporter": ""
},
"ktnbPluginMetadata": {
"isAddProjectLibrariesToClasspath": false
},
"language_info": {
"codemirror_mode": "text/x-kotlin",
"file_extension": ".kt",
"mimetype": "text/x-kotlin",
"name": "kotlin",
"nbconvert_exporter": "",
"pygments_lexer": "kotlin",
"version": "1.8.20"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 4
}

View File

@ -18,15 +18,15 @@ kscience {
}
dependencies {
implementation(projects.visionforgeSolid)
implementation(projects.visionforgePlotly)
implementation(projects.visionforgeTables)
implementation(projects.visionforgeMarkdown)
implementation(projects.visionforgeJupyter)
api(projects.visionforgeSolid)
api(projects.visionforgePlotly)
api(projects.visionforgeTables)
api(projects.visionforgeMarkdown)
api(projects.visionforgeJupyter)
}
jvmMain {
implementation(projects.visionforgeGdml)
api(projects.visionforgeGdml)
}
jsMain {

View File

@ -9,7 +9,7 @@ kscience{
api("io.ktor:ktor-server-host-common")
api("io.ktor:ktor-server-html-builder")
api("io.ktor:ktor-server-websockets")
implementation("io.ktor:ktor-server-cors")
api("io.ktor:ktor-server-cors")
}
}