mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28: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> {
|
fun toDependencyLambda(scopes: Collection<Scope>) : (Project) -> List<IClasspathDependency> {
|
||||||
val result = { project : Project ->
|
val result = { project : Project ->
|
||||||
scopes.fold(arrayListOf<IClasspathDependency>(),
|
scopes.fold(arrayListOf<IClasspathDependency>(),
|
||||||
{ l: ArrayList<IClasspathDependency>, scope: Scope ->
|
{ list: ArrayList<IClasspathDependency>, scope: Scope ->
|
||||||
val deps = scope.dependencyLambda(project)
|
list.addAll(scope.dependencyLambda(project))
|
||||||
l.addAll(deps)
|
list
|
||||||
l
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue