mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Fix test classpath for dependent projects.
This commit is contained in:
parent
b6cb358606
commit
035bf4a613
1 changed files with 11 additions and 7 deletions
|
@ -183,14 +183,18 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val
|
||||||
return emptyList()
|
return emptyList()
|
||||||
} else {
|
} else {
|
||||||
val result = arrayListOf<IClasspathDependency>()
|
val result = arrayListOf<IClasspathDependency>()
|
||||||
project.dependsOn.forEach { p ->
|
|
||||||
KFiles.joinDir(p.directory, p.classesDir(context)).let { classDir ->
|
fun maybeAddClassDir(classDir: String) {
|
||||||
// A project is allowed not to have any kobaltBuild/classes directory if it doesn't have
|
// A project is allowed not to have any kobaltBuild/classes or test-classes directory if it doesn't have
|
||||||
// any sources
|
// any sources
|
||||||
if (File(classDir).exists()) {
|
if (File(classDir).exists()) {
|
||||||
result.add(FileDependency(KFiles.joinDir(p.directory, p.classesDir(context))))
|
result.add(FileDependency(classDir))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
project.dependsOn.forEach { p ->
|
||||||
|
maybeAddClassDir(KFiles.joinDir(p.directory, p.classesDir(context)))
|
||||||
|
maybeAddClassDir(KFiles.makeOutputTestDir(project).path)
|
||||||
val otherDependencies = calculateDependencies(p, context, scopeFilters)
|
val otherDependencies = calculateDependencies(p, context, scopeFilters)
|
||||||
result.addAll(otherDependencies)
|
result.addAll(otherDependencies)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue