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:
parent
a508f32295
commit
7690be501c
2 changed files with 18 additions and 8 deletions
|
@ -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))))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue