mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Better JSON payload.
This commit is contained in:
parent
d01e119c12
commit
9d4aa26109
1 changed files with 6 additions and 10 deletions
|
@ -51,15 +51,11 @@ class GetDependenciesCommand @Inject constructor(val executors: KobaltExecutors,
|
||||||
|
|
||||||
val pluginDependencies = pluginUrls.map { File(it.toURI()) }.map { FileDependency(it.absolutePath) }
|
val pluginDependencies = pluginUrls.map { File(it.toURI()) }.map { FileDependency(it.absolutePath) }
|
||||||
projects.forEach { project ->
|
projects.forEach { project ->
|
||||||
val allDependencies =
|
val compileDependencies = pluginDependencies.map { toDependencyData(it, "compile")} +
|
||||||
pluginDependencies.map { toDependencyData(it, "compile")} +
|
allDeps(project.compileDependencies).map { toDependencyData(it, "compile") }
|
||||||
allDeps(project.compileDependencies).map { toDependencyData(it, "compile") } +
|
val testDependencies = allDeps(project.testDependencies).map { toDependencyData(it, "testCompile") }
|
||||||
allDeps(project.compileProvidedDependencies).map { toDependencyData(it, "provided") } +
|
|
||||||
allDeps(project.compileRuntimeDependencies).map { toDependencyData(it, "runtime") } +
|
|
||||||
allDeps(project.testDependencies).map { toDependencyData(it, "testCompile") } +
|
|
||||||
allDeps(project.testProvidedDependencies).map { toDependencyData(it, "testProvided") }
|
|
||||||
|
|
||||||
projectDatas.add(ProjectData(project.name, project.directory, allDependencies,
|
projectDatas.add(ProjectData(project.name, project.directory, compileDependencies, testDependencies,
|
||||||
project.sourceDirectories, project.sourceDirectoriesTest))
|
project.sourceDirectories, project.sourceDirectoriesTest))
|
||||||
}
|
}
|
||||||
log(1, "Returning BuildScriptInfo")
|
log(1, "Returning BuildScriptInfo")
|
||||||
|
@ -74,8 +70,8 @@ class GetDependenciesCommand @Inject constructor(val executors: KobaltExecutors,
|
||||||
|
|
||||||
class DependencyData(val id: String, val scope: String, val path: String)
|
class DependencyData(val id: String, val scope: String, val path: String)
|
||||||
|
|
||||||
class ProjectData(val name: String, val directory: String, val dependencies: List<DependencyData>,
|
class ProjectData(val name: String, val directory: String, val compileDependencies: List<DependencyData>,
|
||||||
val sourceDirs: Set<String>, val testDirs: Set<String>)
|
val testDependencies: List<DependencyData>, val sourceDirs: Set<String>, val testDirs: Set<String>)
|
||||||
|
|
||||||
class GetDependenciesData(val projects: List<ProjectData>)
|
class GetDependenciesData(val projects: List<ProjectData>)
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue