in plugin/src/main/kotlin/com/android/gradle/replicator/ResourceDataGathering.kt [72:95]
override fun startElement(
uri: String, localName: String, qName: String, attributes: Attributes
) {
myDepth++
if (myDepth == 3 && qName == "item") {
currentItemCount++
}
if (myDepth == 2) {
when (qName) {
"string" -> { valuesMap.stringCount++ }
"int" -> { valuesMap.intCount++ }
"bool" -> { valuesMap.boolCount++ }
"color" -> { valuesMap.colorCount++ }
"dimen" -> { valuesMap.dimenCount++ }
"item" -> { if (attributes.getValue("type") == "id") { valuesMap.idCount++ } }
"integer-array" -> {} // Only add on close
"array" -> {} // Only add on close
"style" -> {} // Only add on close
else -> {} // Ignore
}
}
}