@@ -5,8 +5,8 @@ plugins {
55 kotlin(" jvm" ) version " 1.4.0"
66}
77
8- group = " edu.mcgill "
9- version = " 0.1.0 "
8+ group = " com.github.breandan "
9+ version = " 0.1.1 "
1010
1111repositories {
1212 mavenCentral()
@@ -82,13 +82,26 @@ tasks {
8282
8383 val installPathLocal = " ${System .getProperty(" user.home" )} /.jupyter_kotlin/libraries"
8484
85- register<Copy >(" jupyterInstall" ) {
85+ val genNotebookJSON by creating(JavaExec ::class ) {
86+ main = " edu.mcgill.kaliningraph.codegen.NotebookGenKt"
87+ classpath = sourceSets[" main" ].runtimeClasspath
88+ args = listOf (projectDir.path, project.version.toString())
89+ }
90+
91+ val jupyterInstall by registering(Copy ::class ) {
92+ dependsOn(genNotebookJSON)
93+ dependsOn(" publishToMavenLocal" )
8694 val installPath = findProperty(" ath" ) ? : installPathLocal
8795 doFirst { mkdir(installPath) }
8896 from(file(" kaliningraph.json" ))
8997 into(installPath)
9098 doLast { logger.info(" Kaliningraph notebook support was installed in: $installPath " ) }
9199 }
100+
101+ val jupyterRun by creating(Exec ::class ) {
102+ dependsOn(jupyterInstall)
103+ commandLine(" jupyter" , " notebook" , " --notebook-dir=notebooks" )
104+ }
92105}
93106
94107val fatJar by tasks.creating(Jar ::class ) {
@@ -106,7 +119,6 @@ publishing {
106119 publications.create<MavenPublication >(" default" ) {
107120 artifact(fatJar)
108121 pom {
109- name.set(" Kaliningraph" )
110122 url.set(" https://github.com/breandan/kaliningraph" )
111123 licenses {
112124 license {
0 commit comments