mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Refactoring.
This commit is contained in:
parent
8c1f2e8962
commit
d8cbbdc772
2 changed files with 4 additions and 2 deletions
|
@ -19,6 +19,7 @@ public class DependencyManager @Inject constructor(val executors: KobaltExecutor
|
|||
|
||||
/**
|
||||
* @return the classpath for this project, including the IClasspathContributors.
|
||||
* allDependencies is typically either compileDependencies or testDependencies
|
||||
*/
|
||||
fun calculateDependencies(project: Project?, context: KobaltContext,
|
||||
dependentProjects: List<ProjectDescription> = emptyList(),
|
||||
|
|
|
@ -62,9 +62,10 @@ class ApplicationPlugin @Inject constructor(val executors: KobaltExecutors,
|
|||
as List<ProjectDescription>
|
||||
// If the jar file is not fat, we need to add the transitive closure of all dependencies
|
||||
// on the classpath
|
||||
allDeps.addAll(
|
||||
val allTheDependencies =
|
||||
dependencyManager.calculateDependencies(project, context, projDeps,
|
||||
allDependencies = project.compileDependencies).map { it.jarFile.get().path })
|
||||
allDependencies = project.compileDependencies).map { it.jarFile.get().path }
|
||||
allDeps.addAll(allTheDependencies)
|
||||
}
|
||||
val allDepsJoined = allDeps.joinToString(File.pathSeparator)
|
||||
val args = listOf("-classpath", allDepsJoined) + config.jvmArgs + config.mainClass!!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue