com.likethesalad.tools.resource.collector.source.ResourceSourceProvider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resource-collector Show documentation
Show all versions of resource-collector Show documentation
Plugin that gathers resources from Android projects for compilation purposes.
package com.likethesalad.tools.resource.collector.source
import com.likethesalad.tools.resource.collector.filter.ResourceSourceFilter
import com.likethesalad.tools.resource.collector.filter.ResourceSourceFilterRule
abstract class ResourceSourceProvider {
private val filter: ResourceSourceFilter by lazy { ResourceSourceFilter() }
protected abstract fun doGetSources(): List
fun getSources(): List {
return doGetSources().filter { !filter.exclude(it) }
}
fun addFilterRules(rules: List>) {
for (rule in rules) {
filter.addRule(rule)
}
}
}