mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJI-66: mappings filtering + gant target
This commit is contained in:
+8
@@ -19,6 +19,10 @@ import kotlin.streams.toList
|
||||
fun main() = generateMappings()
|
||||
|
||||
private fun generateMappings() {
|
||||
val exclusions = System.getProperty("mappings.json.exclude.paths")
|
||||
?.split(",")
|
||||
?.map(String::trim)
|
||||
?: emptyList()
|
||||
val mappings = (loadIdeaGeneratedIcons() + loadNonGeneratedIcons("idea")).groupBy {
|
||||
"${it.product}#${it.set}"
|
||||
}.toSortedMap().values.flatMap {
|
||||
@@ -29,6 +33,10 @@ private fun generateMappings() {
|
||||
} + it.first()
|
||||
}
|
||||
else it
|
||||
}.filter { mapping ->
|
||||
exclusions.none { excluded ->
|
||||
mapping.path.startsWith(excluded)
|
||||
}
|
||||
}
|
||||
val mappingsJson = mappings.joinToString(separator = ",\n") {
|
||||
it.toString().prependIndent(" ")
|
||||
|
||||
Reference in New Issue
Block a user