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

Send the task description too.

This commit is contained in:
Cedric Beust 2016-04-25 22:18:34 -08:00
parent d02def081a
commit ffac8ca097

View file

@ -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<String>,
val compileDependencies: List<DependencyData>,
val testDependencies: List<DependencyData>, val sourceDirs: Set<String>, val testDirs: Set<String>,
val sourceResourceDirs: Set<String>, val testResourceDirs: Set<String>,
val tasks: Collection<String>)
val tasks: Collection<TaskData>)
class GetDependenciesData(val projects: List<ProjectData>, val errorMessage: String?)
}