-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathbuild.gradle.kts
68 lines (53 loc) · 1.8 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
plugins {
application
id("com.palantir.graal") version "0.12.0"
kotlin("jvm")
}
val entrypoint = "ai.hypergraph.kotlingrad.samples.HelloKotlingradKt"
application.mainClass.set(entrypoint)
graal {
mainClass(entrypoint)
outputName("hello-kotlingrad")
}
dependencies {
implementation(kotlin("stdlib"))
compileOnly("org.jetbrains:annotations:26.0.1")
implementation(project(":kotlingrad"))
implementation("org.graalvm.js:js:24.1.1")
implementation("guru.nidi:graphviz-kotlin:0.18.1")
// Graphical libraries
implementation("org.jzy3d:jzy3d-api:1.0.3")
implementation("org.jetbrains.lets-plot:lets-plot-kotlin-jvm:4.9.3")
implementation("org.jetbrains.lets-plot:platf-awt-jvm:4.5.2")
implementation("org.nield:kotlin-statistics:1.2.1")
}
tasks {
listOf(
"HelloKotlingrad", "Plot2D", "Plot3D", "VisualizeDFG", "VariableCapture",
"LetsPlot", "ScalarDemo", "VectorDemo", "MatrixDemo",
"MLP", "LinearRegression", "PolynomialRegression",
"PolynomialAttack", "ReadSeff", "Arithmetic"
).forEach { fileName ->
register(fileName, JavaExec::class) {
mainClass.set("ai.hypergraph.kotlingrad.samples.${fileName}Kt")
classpath = sourceSets["main"].runtimeClasspath
}
}
/*
If overwriting an older version, it is necessary to first run:
rm -rf ~/.m2/repository/ai/hypergraph/kaliningraph \
~/.ivy2/cache/ai.hypergraph/kaliningraph
https://github.com/Kotlin/kotlin-jupyter/issues/121
To deploy to Maven Local and start the notebook, run:
./gradlew [build publishToMavenLocal] jupyterRun -x test
*/
val jupyterRun by creating(Exec::class) {
commandLine("jupyter", "notebook", "--notebook-dir=notebooks")
}
test {
dependsOn(
"HelloKotlingrad", "ScalarDemo", "MatrixDemo", "VectorDemo",
"LinearRegression", "MLP", "VariableCapture"
)
}
}