mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Fix the “empty source” bug in KobaltServer.
The plug-in needs to send the root of the project, but for now, calculating it from the path of the build file.
This commit is contained in:
parent
43346a256d
commit
eaaa6fbcef
1 changed files with 3 additions and 1 deletions
|
@ -125,6 +125,8 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v
|
|||
.map { toDependencyData2("testCompile", it)}
|
||||
}
|
||||
|
||||
val projectRoot = File(buildFilePath).parentFile.parentFile.parentFile
|
||||
|
||||
val allTasks = hashSetOf<TaskData>()
|
||||
projectResult.projects.withIndex().forEach { wi ->
|
||||
val project = wi.value
|
||||
|
@ -136,7 +138,7 @@ class RemoteDependencyData @Inject constructor(val executors: KobaltExecutors, v
|
|||
|
||||
// Separate resource from source directories
|
||||
fun partition(project: Project, dirs: Collection<String>)
|
||||
= dirs.filter { File(project.directory, it).exists() }
|
||||
= dirs.filter { File(KFiles.joinDir(projectRoot.absolutePath, project.directory, it)).exists() }
|
||||
.partition { KFiles.isResource(it) }
|
||||
val sources = partition(project, project.sourceDirectories)
|
||||
val tests = partition(project, project.sourceDirectoriesTest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue