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", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": { "metadata": {},
"collapsed": true
},
"outputs": [], "outputs": [],
"source": [ "source": [
"@file:Repository(\"*mavenLocal\")\n", "@file:Repository(\"*mavenLocal\")\n",
"@file:Repository(\"https://repo.kotlin.link\")\n", "@file:Repository(\"https://repo.kotlin.link\")\n",
"@file:Repository(\"https://maven.pkg.jetbrains.space/spc/p/sci/dev\")\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", "cell_type": "code",
"execution_count": null, "execution_count": null,
"outputs": [],
"source": [
":classpath"
],
"metadata": { "metadata": {
"collapsed": false "collapsed": false,
"jupyter": {
"outputs_hidden": false
} }
}, },
{
"cell_type": "code",
"execution_count": null,
"outputs": [], "outputs": [],
"source": [ "source": [
"import io.ktor.server.cio.CIO\n",
"\n",
"println(CIO)\n",
"\n",
"vf.startServer()" "vf.startServer()"
], ]
"metadata": {
"collapsed": false
}
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"import space.kscience.visionforge.plotly.plotly\n", "import space.kscience.visionforge.plotly.plotly\n",
"import space.kscience.plotly.*\n",
"import space.kscience.plotly.models.*\n",
"\n", "\n",
"vf.page {\n", "vf.page {\n",
" h1 { +\"AAA\" }\n", " h1 { +\"AAA\" }\n",
@ -65,19 +70,19 @@
" }\n", " }\n",
" }\n", " }\n",
"}" "}"
], ]
"metadata": {
"collapsed": false
}
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"outputs": [],
"source": [],
"metadata": { "metadata": {
"collapsed": false "collapsed": false,
"jupyter": {
"outputs_hidden": false
} }
},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {
@ -86,19 +91,19 @@
"language": "kotlin", "language": "kotlin",
"name": "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": { "ktnbPluginMetadata": {
"isAddProjectLibrariesToClasspath": false "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": 4,
"nbformat_minor": 0 "nbformat_minor": 4
} }

View File

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

View File

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