From b31f387080372c9f26e7ee6b05709c34f3cf6ee2 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Wed, 21 Oct 2015 23:52:49 -0700 Subject: [PATCH] Javadoc + reformatting. --- .../internal/remote/GetDependenciesCommand.kt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/internal/remote/GetDependenciesCommand.kt b/src/main/kotlin/com/beust/kobalt/internal/remote/GetDependenciesCommand.kt index 3b6c7342..ba61eaf4 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/remote/GetDependenciesCommand.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/remote/GetDependenciesCommand.kt @@ -12,6 +12,15 @@ import com.google.gson.JsonObject import com.google.inject.Inject import java.nio.file.Paths +/** + * This command returns the list of dependencies for the given buildFile. + * Payload: + * { + * "name" : "getDependencies" + * "buildFile": "Build.kt" + * } + * The response is a GetDependenciesData. + */ class GetDependenciesCommand @Inject constructor(val executors: KobaltExecutors, val buildFileCompilerFactory: BuildFileCompiler.IFactory, val args: Args) : ICommand { override val name = "getDependencies" @@ -37,11 +46,11 @@ class GetDependenciesCommand @Inject constructor(val executors: KobaltExecutors, info.projects.forEach { project -> val allDependencies = - project.compileDependencies.map { toDependencyData(it, "compile") } + - project.compileProvidedDependencies.map { toDependencyData(it, "provided") } + - project.compileRuntimeDependencies.map { toDependencyData(it, "runtime") } + - project.testDependencies.map { toDependencyData(it, "testCompile") } + - project.testProvidedDependencies.map { toDependencyData(it, "testProvided") } + project.compileDependencies.map { toDependencyData(it, "compile") } + + project.compileProvidedDependencies.map { toDependencyData(it, "provided") } + + project.compileRuntimeDependencies.map { toDependencyData(it, "runtime") } + + project.testDependencies.map { toDependencyData(it, "testCompile") } + + project.testProvidedDependencies.map { toDependencyData(it, "testProvided") } projects.add(ProjectData(project.name!!, allDependencies)) }