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

Refactor.

This commit is contained in:
Cedric Beust 2016-07-29 01:43:54 -08:00
parent 3d91256eb6
commit f629b76658

View file

@ -58,10 +58,9 @@ enum class Scope(val scope: String, val dependencyLambda: (Project) -> List<ICla
fun toDependencyLambda(scopes: Collection<Scope>) : (Project) -> List<IClasspathDependency> {
val result = { project : Project ->
scopes.fold(arrayListOf<IClasspathDependency>(),
{ l: ArrayList<IClasspathDependency>, scope: Scope ->
val deps = scope.dependencyLambda(project)
l.addAll(deps)
l
{ list: ArrayList<IClasspathDependency>, scope: Scope ->
list.addAll(scope.dependencyLambda(project))
list
})
}
return result