mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Refactor.
This commit is contained in:
parent
67ab53f8a3
commit
ab95e4fc75
1 changed files with 3 additions and 3 deletions
|
@ -77,10 +77,10 @@ fun glob(g: String) : IFileSpec.GlobSpec = IFileSpec.GlobSpec(g)
|
||||||
*/
|
*/
|
||||||
@Directive
|
@Directive
|
||||||
fun localMaven() : String {
|
fun localMaven() : String {
|
||||||
var result = Kobalt.INJECTOR.getInstance(KobaltSettings::class.java).localMavenRepo
|
|
||||||
val pluginInfo = Kobalt.INJECTOR.getInstance(PluginInfo::class.java)
|
val pluginInfo = Kobalt.INJECTOR.getInstance(PluginInfo::class.java)
|
||||||
pluginInfo.localMavenRepoPathInterceptors.forEach {
|
val initial = Kobalt.INJECTOR.getInstance(KobaltSettings::class.java).localMavenRepo
|
||||||
result = File(it.repoPath(result.absolutePath))
|
val result = pluginInfo.localMavenRepoPathInterceptors.fold(initial) { current, interceptor ->
|
||||||
|
File(interceptor.repoPath(current.absolutePath))
|
||||||
}
|
}
|
||||||
return result.toURI().toString()
|
return result.toURI().toString()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue