![JAR search and dependency download from the Maven repository](/logo.png)
com.avito.android.providers.RemoteAvitoModuleOwnersProvider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of code-ownership Show documentation
Show all versions of code-ownership Show documentation
Collection of infrastructure libraries and gradle plugins of Avito Android project
The newest version!
package com.avito.android.providers
import com.avito.android.diff.provider.OwnersProvider
import com.avito.android.model.Owner
import com.avito.android.model.network.AvitoOwnersClient
internal class RemoteAvitoModuleOwnersProvider(
private val client: AvitoOwnersClient,
) : OwnersProvider {
override fun get(): Set {
return client.getAvitoOwners()
.flatMap { owner ->
mutableListOf().apply {
add(
RemoteAvitoCodeOwner(
name = owner.name,
id = owner.id,
type = owner.type,
parent = null
)
)
addAll(owner.children.map { child ->
RemoteAvitoCodeOwner(
name = child.name,
id = child.id,
type = child.type,
parent = owner.name
)
})
}
}
.toSet()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy