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

Refactoring.

This commit is contained in:
Cedric Beust 2015-11-16 04:41:49 -08:00
parent 8c1f2e8962
commit d8cbbdc772
2 changed files with 4 additions and 2 deletions

View file

@ -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(),

View file

@ -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!!