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

Crash when no dependent projects have been found.

This commit is contained in:
Cedric Beust 2016-04-11 20:25:49 -08:00
parent 95713968fd
commit 1e9a49ef43

View file

@ -39,14 +39,15 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep
allDeps(project.compileProvidedDependencies).map { toDependencyData(it, "compile") }
val testDependencies = allDeps(project.testDependencies).map { toDependencyData(it, "testCompile") }
@Suppress("UNCHECKED_CAST")
val pd = (project.projectProperties.get(JvmCompilerPlugin.DEPENDENT_PROJECTS)
as List<ProjectDescription>)
val dependentProjects = pd.filter { it.project.name == project.name }.flatMap {
it.dependsOn.map {
it.name
val pd = project.projectProperties.get(JvmCompilerPlugin.DEPENDENT_PROJECTS)
val dependentProjects = if (pd != null) {
@Suppress("UNCHECKED_CAST")
(pd as List<ProjectDescription>).filter { it.project.name == project.name }.flatMap {
it.dependsOn.map { it.name }
}
} else {
emptyList()
}
}
// Separate resource from source directories
val sources = project.sourceDirectories.partition { KFiles.isResource(it) }