Skip to content

Commit

Permalink
Include dependencies inside jar
Browse files Browse the repository at this point in the history
  • Loading branch information
petukhovv committed Feb 27, 2019
1 parent c4b6344 commit 675d4b2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ version = "0.1"

val archivePrefix = "kotlin-grammar-tools"
val jar: Jar by tasks
jar.archiveName = "$archivePrefix.jar"

repositories {
mavenCentral()
mavenLocal()
}

dependencies {
compile(kotlin("stdlib-jdk8"))
compileOnly(kotlin("stdlib-jdk8"))
compile("org.jetbrains.kotlin.spec.grammar:kotlin-grammar-parser:0.1")
}

Expand All @@ -37,3 +36,15 @@ publishing {
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

jar.archiveName = "$archivePrefix-$version.jar"

jar.manifest {
attributes(
mapOf(
"Class-Path" to configurations.runtime.files.joinToString(" ") { it.name }
)
)
}

jar.from(configurations.runtime.map { if (it.isDirectory) it else zipTree(it) })

0 comments on commit 675d4b2

Please sign in to comment.