Skip to content

Commit b4835db

Browse files
committed
gradlify jupyter build, default to mavenLocal
1 parent f47bc99 commit b4835db

File tree

8 files changed

+20
-17
lines changed

8 files changed

+20
-17
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ dependencies {
108108
[First install](https://github.com/kotlin/kotlin-jupyter#installation) the Kotlin Jupyter kernel, then run the `jupyterInstall` task to install the library descriptor:
109109

110110
```
111-
./gradlew jupyterInstall [-Path=~/.jupyter_kotlin/libraries]
111+
./gradlew jupyterRun
112112
```
113113

114114
To access Kotlin∇'s notebook support, use the following line magic:

build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ idea.module {
2828
}
2929

3030
subprojects {
31-
group = "edu.umontreal"
32-
version = "0.3.4"
31+
group = "com.github.breandan"
32+
version = "0.3.5"
3333

3434
apply(plugin = "org.jetbrains.kotlin.jvm")
3535

core/build.gradle.kts

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies {
66
implementation(kotlin("stdlib"))
77
implementation(kotlin("stdlib-jdk8"))
88
// implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0")
9-
api("com.github.breandan:kaliningraph:0.1.0")
9+
api("com.github.breandan:kaliningraph")
1010

1111
// Mathematical libraries
1212
implementation("ch.obermuhlner:big-math:2.3.0")
@@ -48,6 +48,7 @@ tasks {
4848

4949
val jupyterInstall by registering(Copy::class) {
5050
dependsOn(genNotebookJSON)
51+
dependsOn("publishToMavenLocal")
5152
val installPath = findProperty("ath") ?: installPathLocal
5253
doFirst { mkdir(installPath) }
5354
from(file("kotlingrad.json"))
@@ -62,6 +63,7 @@ val fatJar by tasks.creating(Jar::class) {
6263
attributes["Implementation-Title"] = "kotlingrad"
6364
attributes["Implementation-Version"] = archiveVersion
6465
}
66+
setExcludes(listOf("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA"))
6567
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
6668
with(tasks.jar.get() as CopySpec)
6769
}

core/kotlingrad.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"link": "https://github.com/breandan/kotlingrad",
33
"repositories": [
4+
"*mavenLocal",
45
"https://jitpack.io"
56
],
67
"dependencies": [
7-
"com.github.breandan:kotlingrad:0.3.4"
8+
"com.github.breandan:kotlingrad:0.3.5"
89
],
910
"imports": [
1011
"edu.umontreal.kotlingrad.experimental.*",

core/src/main/kotlin/edu/umontreal/kotlingrad/utils/codegen/NotebookGen.kt

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ fun main(args: Array<String>) =
88
"""{
99
"link": "https://github.com/breandan/kotlingrad",
1010
"repositories": [
11+
"*mavenLocal",
1112
"https://jitpack.io"
1213
],
1314
"dependencies": [

kaliningraph

samples/build.gradle.kts

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ graal {
1313
}
1414

1515
dependencies {
16-
implementation(project(":core"))
16+
implementation(project(":kotlingrad"))
1717
implementation(kotlin("stdlib-jdk8"))
1818

1919
// Graphical libraries
@@ -36,6 +36,12 @@ tasks {
3636
}
3737
}
3838

39+
val jupyterRun by creating(Exec::class) {
40+
dependsOn(":kotlingrad:jupyterInstall")
41+
dependsOn(gradle.includedBuild("kaliningraph").task(":jupyterInstall"))
42+
commandLine("jupyter", "notebook", "--notebook-dir=notebooks")
43+
}
44+
3945
test {
4046
dependsOn("ScalarDemo", "MatrixDemo", "VectorDemo", "VariableCapture")
4147
}

settings.gradle.kts

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
//import de.fayard.dependencies.bootstrapRefreshVersionsAndDependencies
2-
31
include("core", "samples")
42
includeBuild("kaliningraph") {
53
dependencySubstitution {
64
substitute(module("com.github.breandan:kaliningraph")).with(project(":"))
75
}
86
}
97

8+
project(":core").name = "kotlingrad"
9+
1010
pluginManagement.repositories {
1111
mavenCentral()
1212
gradlePluginPortal()
13-
}
14-
15-
//buildscript {
16-
// repositories { gradlePluginPortal() }
17-
// dependencies.classpath("de.fayard:dependencies:0.5.8")
18-
//}
19-
//
20-
//bootstrapRefreshVersionsAndDependencies()
13+
}

0 commit comments

Comments
 (0)