Skip to content

Commit

Permalink
Optimize KnownAssetTagsGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
kapitoshka438 committed Apr 23, 2024
1 parent 9db8454 commit ac98bc1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ final class KnownAssetTagsGenerator: KnownAssetTagsGenerating {
var assetContentsPaths: Set<Path> = []
let decoder = JSONDecoder()
for target in project.targets {
for resource in target.resources.resources {
guard let children = try? resource.path.path.recursiveChildren() else { continue }
let assetCatalogs = target.resources.resources.filter { $0.path.extension == "xcassets" }
for assetCatalog in assetCatalogs {
guard let children = try? assetCatalog.path.path.recursiveChildren() else { continue }
let contents = children.filter { $0.lastComponent == "Contents.json" }
for content in contents {
assetContentsPaths.insert(content)
Expand Down

0 comments on commit ac98bc1

Please sign in to comment.