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

GITHUB-231: Fix the incorrect order of builds.

Fixes https://github.com/cbeust/kobalt/issues/231
This commit is contained in:
Cedric Beust 2016-06-10 21:52:21 -08:00
parent 5a540f3474
commit 7e983ed529
5 changed files with 113 additions and 42 deletions

View file

@ -20,7 +20,6 @@ import java.io.InputStream
import java.lang.reflect.Modifier
import java.net.URL
import java.net.URLClassLoader
import java.util.*
import java.util.jar.JarInputStream
class BuildScriptUtil @Inject constructor(val plugins: Plugins, val files: KFiles,
@ -113,14 +112,14 @@ class BuildScriptUtil @Inject constructor(val plugins: Plugins, val files: KFile
context.pluginInfo.projectContributors.forEach { contributor ->
val descriptions = contributor.projects()
descriptions.forEach { pd ->
all.add(pd.project)
topologicalProjects.addNode(pd.project)
pd.dependsOn.forEach { dependsOn ->
topologicalProjects.addEdge(pd.project, dependsOn)
all.add(dependsOn)
}
}
}
val result = topologicalProjects.sort(ArrayList(all))
val result = topologicalProjects.sort()
return result
}