Skip to content

Commit 2a1c59d

Browse files
committed
bundle transitive deps in a fatJar
1 parent 6a85265 commit 2a1c59d

File tree

2 files changed

+49
-29
lines changed

2 files changed

+49
-29
lines changed

build.gradle.kts

+46-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import org.gradle.api.JavaVersion.VERSION_1_8
22

33
plugins {
4-
java
5-
maven
4+
`maven-publish`
65
kotlin("jvm") version "1.4.0"
76
}
87

98
group = "edu.mcgill"
10-
version = "0.0.8"
9+
version = "0.0.9"
1110

1211
repositories {
1312
mavenCentral()
@@ -19,27 +18,26 @@ repositories {
1918

2019
dependencies {
2120
implementation(kotlin("stdlib-jdk8"))
22-
testImplementation("junit", "junit", "4.13")
2321
val ejmlVersion = "0.39"
24-
implementation("org.ejml:ejml-kotlin:$ejmlVersion")
25-
implementation("org.ejml:ejml-all:$ejmlVersion")
26-
implementation("guru.nidi:graphviz-kotlin:0.17.0")
22+
api("org.ejml:ejml-kotlin:$ejmlVersion")
23+
api("org.ejml:ejml-all:$ejmlVersion")
24+
api("guru.nidi:graphviz-kotlin:0.17.0")
25+
api("io.github.vovak.astminer:astminer:0.5")
26+
2727
implementation("org.apache.commons:commons-rng-examples-sampling:1.3")
2828
implementation("com.github.kwebio:kweb-core:0.7.20")
2929
implementation("org.slf4j:slf4j-simple:1.7.30")
3030
implementation("com.github.breandan:tensor:master-SNAPSHOT")
31-
implementation("io.github.vovak.astminer:astminer:0.5")
3231

3332
// val kmathVersion by extra { "0.1.4-dev-8" }
3433
// implementation("scientifik:kmath-core:$kmathVersion")
3534
// implementation("scientifik:kmath-ast:$kmathVersion")
3635
// implementation("scientifik:kmath-prob:$kmathVersion")
3736

37+
testImplementation("junit", "junit", "4.13")
3838
testImplementation("com.github.ajalt:clikt:2.6.0")
39-
4039
testImplementation("com.redislabs:jredisgraph:2.0.2")
4140
testImplementation("io.lacuna:bifurcan:0.2.0-alpha1")
42-
4341
testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
4442
val jgraphtVersion by extra { "1.5.0" }
4543
testImplementation("org.jgrapht:jgrapht-core:$jgraphtVersion")
@@ -89,4 +87,42 @@ tasks {
8987
into(installPath)
9088
doLast { logger.info("Kaliningraph notebook support was installed in: $installPath") }
9189
}
90+
}
91+
92+
val fatJar by tasks.creating(Jar::class) {
93+
archiveBaseName.set("${project.name}-fat")
94+
manifest {
95+
attributes["Implementation-Title"] = "kaliningraph"
96+
attributes["Implementation-Version"] = archiveVersion
97+
}
98+
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
99+
with(tasks.jar.get() as CopySpec)
100+
}
101+
102+
publishing {
103+
publications.create<MavenPublication>("default") {
104+
artifact(fatJar)
105+
pom {
106+
name.set("Kaliningraph")
107+
url.set("https://github.com/breandan/kaliningraph")
108+
licenses {
109+
license {
110+
name.set("The Apache Software License, Version 1.0")
111+
url.set("http://www.apache.org/licenses/LICENSE-3.0.txt")
112+
distribution.set("repo")
113+
}
114+
}
115+
developers {
116+
developer {
117+
id.set("Breandan Considine")
118+
name.set("Breandan Considine")
119+
email.set("[email protected]")
120+
organization.set("McGill University")
121+
}
122+
}
123+
scm {
124+
url.set("https://github.com/breandan/kaliningraph")
125+
}
126+
}
127+
}
92128
}

kaliningraph.json

+3-19
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,13 @@
11
{
22
"properties": {
3-
"kaliningraphVersion": "0.0.8",
4-
"graphvizVersion": "0.16.0",
5-
"jgraphtVersion": "1.4.0",
6-
"ejmlVersion": "0.39",
7-
"mathVersion": "3.6.1",
8-
"tinkerpopVersion": "3.4.6",
9-
"astminerVersion": "0.5"
3+
"kaliningraphVersion": "0.0.9"
104
},
115
"link": "https://github.com/breandan/kaliningraph",
126
"repositories": [
13-
"https://jitpack.io",
14-
"https://dl.bintray.com/egor-bogomolov/astminer"
7+
"https://jitpack.io"
158
],
169
"dependencies": [
17-
"com.github.breandan:kaliningraph:$kaliningraphVersion",
18-
"guru.nidi:graphviz-kotlin:$graphvizVersion",
19-
"org.ejml:ejml-kotlin:$ejmlVersion",
20-
"org.ejml:ejml-all:$ejmlVersion",
21-
"org.apache.commons:commons-math3:$mathVersion",
22-
"org.jgrapht:jgrapht-core:$jgraphtVersion",
23-
"org.jgrapht:jgrapht-ext:$jgraphtVersion",
24-
"org.apache.tinkerpop:gremlin-core:$tinkerpopVersion",
25-
"org.apache.tinkerpop:tinkergraph-gremlin:$tinkerpopVersion",
26-
"io.github.vovak.astminer:astminer:$astminerVersion"
10+
"com.github.breandan:kaliningraph:$kaliningraphVersion"
2711
],
2812
"imports": [
2913
"edu.mcgill.kaliningraph.*",

0 commit comments

Comments
 (0)