1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -07:00

Add runtime scope.

This commit is contained in:
Cedric Beust 2015-10-08 22:57:02 -07:00
parent a508f32295
commit 7690be501c
2 changed files with 18 additions and 8 deletions

View file

@ -143,14 +143,17 @@ public class PackagingPlugin @Inject constructor(val dependencyManager : Depende
}
//
// If fatJar is true, add all the transitive dependencies too
// If fatJar is true, add all the transitive dependencies as well (both compile and runtime)
//
if (jar.fatJar) {
log(2, "Creating fat jar")
val allDependencies = dependencyManager.transitiveClosure(project.compileDependencies)
allDependencies.map { it.jarFile.get() }.forEach {
if (! isExcluded(it, jar.excludes)) {
allFiles.add(IncludedFile(arrayListOf(FileSpec(it.path))))
listOf(dependencyManager.transitiveClosure(project.compileDependencies),
dependencyManager.transitiveClosure(project.compileRuntimeDependencies)).forEach { dep ->
dep.map { it.jarFile.get() }.forEach {
if (!isExcluded(it, jar.excludes)) {
allFiles.add(IncludedFile(arrayListOf(FileSpec(it.path))))
}
}
}
}