From 0938bcc3bffb45ca4029e301711d0f2e80b679bb Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 17 Apr 2017 08:38:53 -0700 Subject: [PATCH] GH-413: Duplicate compilation. Fixes https://github.com/cbeust/kobalt/pull/413 --- .../beust/kobalt/app/remote/RemoteDependencyData.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/app/remote/RemoteDependencyData.kt b/src/main/kotlin/com/beust/kobalt/app/remote/RemoteDependencyData.kt index 3f6a2a31..fcd0a80c 100644 --- a/src/main/kotlin/com/beust/kobalt/app/remote/RemoteDependencyData.kt +++ b/src/main/kotlin/com/beust/kobalt/app/remote/RemoteDependencyData.kt @@ -30,7 +30,7 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v val taskManager: TaskManager) { fun dependenciesDataFor(buildSources: BuildSources, args: Args, - findProjectResult: BuildFileCompiler.FindProjectResult, + projectResult: BuildFileCompiler.FindProjectResult, progressListener: IProgressListener? = null, useGraph : Boolean = false): GetDependenciesData { val projectDatas = arrayListOf() @@ -43,10 +43,6 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v fun allDeps(l: List, name: String) = dependencyManager.transitiveClosure(l, requiredBy = name) -// val buildFile = BuildFile(Paths.get(buildFilePath), "GetDependenciesCommand") - val buildFileCompiler = buildFileCompilerFactory.create(buildSources, pluginInfo) - val projectResult = buildFileCompiler.compileBuildFiles(args) - val buildFileDependencies = Kobalt.buildFileClasspath.map {toDependencyData(it, "compile")} val pluginDependencies = projectResult.pluginUrls.map { File(it.toURI()) }.map { @@ -179,8 +175,8 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v }) } - return GetDependenciesData(projectDatas, allTasks, pluginDependencies, buildFileDependencies, findProjectResult.buildContentRoots, - projectResult.taskResult.errorMessage) + return GetDependenciesData(projectDatas, allTasks, pluginDependencies, buildFileDependencies, + projectResult.buildContentRoots, projectResult.taskResult.errorMessage) } /////