mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Javadoc + reformatting.
This commit is contained in:
parent
5b3ef5e919
commit
b31f387080
1 changed files with 14 additions and 5 deletions
|
@ -12,6 +12,15 @@ import com.google.gson.JsonObject
|
||||||
import com.google.inject.Inject
|
import com.google.inject.Inject
|
||||||
import java.nio.file.Paths
|
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,
|
class GetDependenciesCommand @Inject constructor(val executors: KobaltExecutors,
|
||||||
val buildFileCompilerFactory: BuildFileCompiler.IFactory, val args: Args) : ICommand {
|
val buildFileCompilerFactory: BuildFileCompiler.IFactory, val args: Args) : ICommand {
|
||||||
override val name = "getDependencies"
|
override val name = "getDependencies"
|
||||||
|
@ -37,11 +46,11 @@ class GetDependenciesCommand @Inject constructor(val executors: KobaltExecutors,
|
||||||
|
|
||||||
info.projects.forEach { project ->
|
info.projects.forEach { project ->
|
||||||
val allDependencies =
|
val allDependencies =
|
||||||
project.compileDependencies.map { toDependencyData(it, "compile") } +
|
project.compileDependencies.map { toDependencyData(it, "compile") } +
|
||||||
project.compileProvidedDependencies.map { toDependencyData(it, "provided") } +
|
project.compileProvidedDependencies.map { toDependencyData(it, "provided") } +
|
||||||
project.compileRuntimeDependencies.map { toDependencyData(it, "runtime") } +
|
project.compileRuntimeDependencies.map { toDependencyData(it, "runtime") } +
|
||||||
project.testDependencies.map { toDependencyData(it, "testCompile") } +
|
project.testDependencies.map { toDependencyData(it, "testCompile") } +
|
||||||
project.testProvidedDependencies.map { toDependencyData(it, "testProvided") }
|
project.testProvidedDependencies.map { toDependencyData(it, "testProvided") }
|
||||||
|
|
||||||
projects.add(ProjectData(project.name!!, allDependencies))
|
projects.add(ProjectData(project.name!!, allDependencies))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue