Use a map

This commit is contained in:
Syer10 2021-07-23 19:52:36 -04:00
parent 4452c89dbb
commit afd659813d

View File

@ -25,22 +25,13 @@ object InspectorMain {
val (pkgName, sources) = installAPK(tmpDir) {
it
}
ExtensionJson(
pkgName,
sources.map { source -> SourceJson(source) }
)
pkgName to sources.map { source -> SourceJson(source) }
} else null
}
}.toMap()
File(outputPath).writeText(Json.encodeToString(extensions))
}
@Serializable
data class ExtensionJson(
val pkgName: String,
val sources: List<SourceJson>
)
@Serializable
data class SourceJson(
val name: String,