From ffac8ca09776ea15c43cc2b7100f03de39031e22 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 25 Apr 2016 22:18:34 -0800 Subject: [PATCH] Send the task description too. --- .../com/beust/kobalt/app/remote/DependencyData.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/app/remote/DependencyData.kt b/src/main/kotlin/com/beust/kobalt/app/remote/DependencyData.kt index 2beb6f7b..b5d0d8fb 100644 --- a/src/main/kotlin/com/beust/kobalt/app/remote/DependencyData.kt +++ b/src/main/kotlin/com/beust/kobalt/app/remote/DependencyData.kt @@ -54,26 +54,31 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep // Separate resource from source directories val sources = project.sourceDirectories.partition { KFiles.isResource(it) } val tests = project.sourceDirectoriesTest.partition { KFiles.isResource(it) } + val allTasks = taskManager.tasksByNames(project).values().map { + TaskData(it.name, it.doc) + } projectDatas.add(ProjectData(project.name, project.directory, dependentProjects, compileDependencies, testDependencies, sources.second.toSet(), tests.second.toSet(), sources.first.toSet(), tests.first.toSet(), - taskManager.tasksByNames(project).keySet())) + allTasks)) } return GetDependenciesData(projectDatas, projectResult.taskResult.errorMessage) } ///// - // The JSON payloads that this command uses + // The JSON payloads that this command uses. The IDEA plug-in (and any client of the server) needs to + // use these same classes. // class DependencyData(val id: String, val scope: String, val path: String) + class TaskData(val name: String, val description: String) class ProjectData(val name: String, val directory: String, val dependentProjects: List, val compileDependencies: List, val testDependencies: List, val sourceDirs: Set, val testDirs: Set, val sourceResourceDirs: Set, val testResourceDirs: Set, - val tasks: Collection) + val tasks: Collection) class GetDependenciesData(val projects: List, val errorMessage: String?) }