mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-06-16 13:20:52 -07:00
Merge pull request #413 from dmitry-zhuravlev/master
+ server should send buildFileClasspath to plugin. close #410
This commit is contained in:
commit
dcdbbdc6c3
3 changed files with 7 additions and 1 deletions
|
@ -116,6 +116,7 @@ fun buildFileClasspath(vararg deps: String) {
|
|||
}
|
||||
|
||||
fun newBuildFileClasspath(vararg deps: String) {
|
||||
//FIXME newBuildFileClasspath called twice
|
||||
deps.forEach { Kobalt.addBuildFileClasspath(it) }
|
||||
}
|
||||
|
||||
|
|
|
@ -135,6 +135,7 @@ class Kobalt {
|
|||
|
||||
fun cleanUp() {
|
||||
buildSourceDirs.clear()
|
||||
buildFileClasspath.clear()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.beust.kobalt.app.remote
|
|||
|
||||
import com.beust.kobalt.Args
|
||||
import com.beust.kobalt.api.IClasspathDependency
|
||||
import com.beust.kobalt.api.Kobalt
|
||||
import com.beust.kobalt.api.Project
|
||||
import com.beust.kobalt.app.BuildFileCompiler
|
||||
import com.beust.kobalt.internal.DynamicGraph
|
||||
|
@ -46,6 +47,8 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v
|
|||
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 {
|
||||
DependencyData(it.name, "compile", it.absolutePath)
|
||||
}
|
||||
|
@ -176,7 +179,7 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v
|
|||
})
|
||||
}
|
||||
|
||||
return GetDependenciesData(projectDatas, allTasks, pluginDependencies, findProjectResult.buildContentRoots,
|
||||
return GetDependenciesData(projectDatas, allTasks, pluginDependencies, buildFileDependencies, findProjectResult.buildContentRoots,
|
||||
projectResult.taskResult.errorMessage)
|
||||
}
|
||||
|
||||
|
@ -202,6 +205,7 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v
|
|||
class GetDependenciesData(val projects: List<ProjectData> = emptyList(),
|
||||
val allTasks: Collection<TaskData> = emptySet(),
|
||||
val pluginDependencies: List<DependencyData> = emptyList(),
|
||||
val buildFileDependencies: List<DependencyData> = emptyList(),
|
||||
val buildContentRoots: List<String> = emptyList(),
|
||||
val errorMessage: String?) {
|
||||
companion object {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue