1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -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,13 +39,14 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep
allDeps(project.compileProvidedDependencies).map { toDependencyData(it, "compile") } allDeps(project.compileProvidedDependencies).map { toDependencyData(it, "compile") }
val testDependencies = allDeps(project.testDependencies).map { toDependencyData(it, "testCompile") } val testDependencies = allDeps(project.testDependencies).map { toDependencyData(it, "testCompile") }
val pd = project.projectProperties.get(JvmCompilerPlugin.DEPENDENT_PROJECTS)
val dependentProjects = if (pd != null) {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
val pd = (project.projectProperties.get(JvmCompilerPlugin.DEPENDENT_PROJECTS) (pd as List<ProjectDescription>).filter { it.project.name == project.name }.flatMap {
as List<ProjectDescription>) it.dependsOn.map { it.name }
val dependentProjects = pd.filter { it.project.name == project.name }.flatMap {
it.dependsOn.map {
it.name
} }
} else {
emptyList()
} }
// Separate resource from source directories // Separate resource from source directories