Skip to content

Commit

Permalink
bundle transitive deps in a fatJar
Browse files Browse the repository at this point in the history
  • Loading branch information
breandan committed Aug 25, 2020
1 parent 6a85265 commit 2a1c59d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 29 deletions.
56 changes: 46 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import org.gradle.api.JavaVersion.VERSION_1_8

plugins {
java
maven
`maven-publish`
kotlin("jvm") version "1.4.0"
}

group = "edu.mcgill"
version = "0.0.8"
version = "0.0.9"

repositories {
mavenCentral()
Expand All @@ -19,27 +18,26 @@ repositories {

dependencies {
implementation(kotlin("stdlib-jdk8"))
testImplementation("junit", "junit", "4.13")
val ejmlVersion = "0.39"
implementation("org.ejml:ejml-kotlin:$ejmlVersion")
implementation("org.ejml:ejml-all:$ejmlVersion")
implementation("guru.nidi:graphviz-kotlin:0.17.0")
api("org.ejml:ejml-kotlin:$ejmlVersion")
api("org.ejml:ejml-all:$ejmlVersion")
api("guru.nidi:graphviz-kotlin:0.17.0")
api("io.github.vovak.astminer:astminer:0.5")

implementation("org.apache.commons:commons-rng-examples-sampling:1.3")
implementation("com.github.kwebio:kweb-core:0.7.20")
implementation("org.slf4j:slf4j-simple:1.7.30")
implementation("com.github.breandan:tensor:master-SNAPSHOT")
implementation("io.github.vovak.astminer:astminer:0.5")

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

testImplementation("junit", "junit", "4.13")
testImplementation("com.github.ajalt:clikt:2.6.0")

testImplementation("com.redislabs:jredisgraph:2.0.2")
testImplementation("io.lacuna:bifurcan:0.2.0-alpha1")

testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
val jgraphtVersion by extra { "1.5.0" }
testImplementation("org.jgrapht:jgrapht-core:$jgraphtVersion")
Expand Down Expand Up @@ -89,4 +87,42 @@ tasks {
into(installPath)
doLast { logger.info("Kaliningraph notebook support was installed in: $installPath") }
}
}

val fatJar by tasks.creating(Jar::class) {
archiveBaseName.set("${project.name}-fat")
manifest {
attributes["Implementation-Title"] = "kaliningraph"
attributes["Implementation-Version"] = archiveVersion
}
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
with(tasks.jar.get() as CopySpec)
}

publishing {
publications.create<MavenPublication>("default") {
artifact(fatJar)
pom {
name.set("Kaliningraph")
url.set("https://github.com/breandan/kaliningraph")
licenses {
license {
name.set("The Apache Software License, Version 1.0")
url.set("http://www.apache.org/licenses/LICENSE-3.0.txt")
distribution.set("repo")
}
}
developers {
developer {
id.set("Breandan Considine")
name.set("Breandan Considine")
email.set("bre@ndan.co")
organization.set("McGill University")
}
}
scm {
url.set("https://github.com/breandan/kaliningraph")
}
}
}
}
22 changes: 3 additions & 19 deletions kaliningraph.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
{
"properties": {
"kaliningraphVersion": "0.0.8",
"graphvizVersion": "0.16.0",
"jgraphtVersion": "1.4.0",
"ejmlVersion": "0.39",
"mathVersion": "3.6.1",
"tinkerpopVersion": "3.4.6",
"astminerVersion": "0.5"
"kaliningraphVersion": "0.0.9"
},
"link": "https://github.com/breandan/kaliningraph",
"repositories": [
"https://jitpack.io",
"https://dl.bintray.com/egor-bogomolov/astminer"
"https://jitpack.io"
],
"dependencies": [
"com.github.breandan:kaliningraph:$kaliningraphVersion",
"guru.nidi:graphviz-kotlin:$graphvizVersion",
"org.ejml:ejml-kotlin:$ejmlVersion",
"org.ejml:ejml-all:$ejmlVersion",
"org.apache.commons:commons-math3:$mathVersion",
"org.jgrapht:jgrapht-core:$jgraphtVersion",
"org.jgrapht:jgrapht-ext:$jgraphtVersion",
"org.apache.tinkerpop:gremlin-core:$tinkerpopVersion",
"org.apache.tinkerpop:tinkergraph-gremlin:$tinkerpopVersion",
"io.github.vovak.astminer:astminer:$astminerVersion"
"com.github.breandan:kaliningraph:$kaliningraphVersion"
],
"imports": [
"edu.mcgill.kaliningraph.*",
Expand Down

0 comments on commit 2a1c59d

Please sign in to comment.