mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Refactor.
This commit is contained in:
parent
3d91256eb6
commit
f629b76658
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue