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

GH-413: Duplicate compilation.

Fixes https://github.com/cbeust/kobalt/pull/413
This commit is contained in:
Cedric Beust 2017-04-17 08:38:53 -07:00
parent dcdbbdc6c3
commit 0938bcc3bf

View file

@ -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<ProjectData>()
@ -43,10 +43,6 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v
fun allDeps(l: List<IClasspathDependency>, 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)
}
/////