From 5e876e879446c91fe1f4af6d4a598490e076ab7a Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 21 Apr 2016 22:08:49 -0800 Subject: [PATCH] Send the tasks. --- .../com/beust/kobalt/app/remote/DependencyData.kt | 10 +++++++--- 1 file changed, 7 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 893e51e8..2beb6f7b 100644 --- a/src/main/kotlin/com/beust/kobalt/app/remote/DependencyData.kt +++ b/src/main/kotlin/com/beust/kobalt/app/remote/DependencyData.kt @@ -6,6 +6,7 @@ import com.beust.kobalt.api.ProjectDescription import com.beust.kobalt.app.BuildFileCompiler import com.beust.kobalt.internal.JvmCompilerPlugin import com.beust.kobalt.internal.PluginInfo +import com.beust.kobalt.internal.TaskManager import com.beust.kobalt.internal.build.BuildFile import com.beust.kobalt.maven.DependencyManager import com.beust.kobalt.maven.dependency.FileDependency @@ -16,7 +17,8 @@ import java.io.File import java.nio.file.Paths class DependencyData @Inject constructor(val executors: KobaltExecutors, val dependencyManager: DependencyManager, - val buildFileCompilerFactory: BuildFileCompiler.IFactory, val pluginInfo: PluginInfo) { + val buildFileCompilerFactory: BuildFileCompiler.IFactory, val pluginInfo: PluginInfo, + val taskManager: TaskManager) { fun dependenciesDataFor(buildFilePath: String, args: Args) : GetDependenciesData { val projectDatas = arrayListOf() @@ -54,7 +56,8 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep val tests = project.sourceDirectoriesTest.partition { KFiles.isResource(it) } projectDatas.add(ProjectData(project.name, project.directory, dependentProjects, compileDependencies, testDependencies, - sources.second.toSet(), tests.second.toSet(), sources.first.toSet(), tests.first.toSet())) + sources.second.toSet(), tests.second.toSet(), sources.first.toSet(), tests.first.toSet(), + taskManager.tasksByNames(project).keySet())) } return GetDependenciesData(projectDatas, projectResult.taskResult.errorMessage) } @@ -69,7 +72,8 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep val dependentProjects: List, val compileDependencies: List, val testDependencies: List, val sourceDirs: Set, val testDirs: Set, - val sourceResourceDirs: Set, val testResourceDirs: Set) + val sourceResourceDirs: Set, val testResourceDirs: Set, + val tasks: Collection) class GetDependenciesData(val projects: List, val errorMessage: String?) }