From 566e16b4b8738886efa6f716bb4c2f82167c1655 Mon Sep 17 00:00:00 2001 From: Patrick Kladek Date: Thu, 9 Mar 2023 23:32:26 +0400 Subject: [PATCH 1/4] add complicationset to others cateloge --- .../Contents.json | 88 +++++++++++++----- .../Circular.imageset/Contents.json | 22 +++++ .../Contents.json | 53 +++++++++++ .../Extra Large.imageset/Contents.json | 22 +++++ .../Graphic Bezel.imageset/Contents.json | 17 ++++ .../Graphic Circular.imageset/Contents.json | 17 ++++ .../Graphic Corner.imageset/Contents.json | 17 ++++ .../Contents.json | 22 +++++ .../Contents.json | 17 ++++ .../Modular.imageset/Contents.json | 32 +++++++ .../Modular Small Simple 38mm.png | Bin 0 -> 1396 bytes .../Modular Small Simple 40mm and 42mm-1.png | Bin 0 -> 1615 bytes .../Modular Small Simple 40mm and 42mm.png | Bin 0 -> 1615 bytes .../Modular Small Simple 44mm.png | Bin 0 -> 1823 bytes .../Utilitarian.imageset/Contents.json | 22 +++++ .../XCAssets/Other.xcassets/Contents.json | 6 +- .../StencilContexts/XCAssets/other.yaml | 11 +++ 17 files changed, 320 insertions(+), 26 deletions(-) create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Circular.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Modular Small Simple 38mm.png create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Modular Small Simple 40mm and 42mm-1.png create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Modular Small Simple 40mm and 42mm.png create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Modular Small Simple 44mm.png create mode 100644 Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json create mode 100644 Sources/TestUtils/Fixtures/StencilContexts/XCAssets/other.yaml diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/AppIcon (watchOS).appiconset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/AppIcon (watchOS).appiconset/Contents.json index 668c89582..957a4cacc 100644 --- a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/AppIcon (watchOS).appiconset/Contents.json +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/AppIcon (watchOS).appiconset/Contents.json @@ -1,88 +1,130 @@ { "images" : [ { - "size" : "24x24", "idiom" : "watch", - "scale" : "2x", "role" : "notificationCenter", + "scale" : "2x", + "size" : "24x24", "subtype" : "38mm" }, { - "size" : "27.5x27.5", "idiom" : "watch", - "scale" : "2x", "role" : "notificationCenter", + "scale" : "2x", + "size" : "27.5x27.5", "subtype" : "42mm" }, { - "size" : "29x29", "idiom" : "watch", "role" : "companionSettings", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { - "size" : "29x29", "idiom" : "watch", "role" : "companionSettings", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { - "size" : "40x40", "idiom" : "watch", + "role" : "notificationCenter", "scale" : "2x", + "size" : "33x33", + "subtype" : "45mm" + }, + { + "idiom" : "watch", "role" : "appLauncher", + "scale" : "2x", + "size" : "40x40", "subtype" : "38mm" }, { - "size" : "44x44", "idiom" : "watch", - "scale" : "2x", "role" : "appLauncher", + "scale" : "2x", + "size" : "44x44", "subtype" : "40mm" }, { - "size" : "50x50", "idiom" : "watch", + "role" : "appLauncher", "scale" : "2x", + "size" : "46x46", + "subtype" : "41mm" + }, + { + "idiom" : "watch", "role" : "appLauncher", + "scale" : "2x", + "size" : "50x50", "subtype" : "44mm" }, { - "size" : "86x86", "idiom" : "watch", + "role" : "appLauncher", "scale" : "2x", + "size" : "51x51", + "subtype" : "45mm" + }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "54x54", + "subtype" : "49mm" + }, + { + "idiom" : "watch", "role" : "quickLook", + "scale" : "2x", + "size" : "86x86", "subtype" : "38mm" }, { - "size" : "98x98", "idiom" : "watch", - "scale" : "2x", "role" : "quickLook", + "scale" : "2x", + "size" : "98x98", "subtype" : "42mm" }, { + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", "size" : "108x108", + "subtype" : "44mm" + }, + { "idiom" : "watch", + "role" : "quickLook", "scale" : "2x", + "size" : "117x117", + "subtype" : "45mm" + }, + { + "idiom" : "watch", "role" : "quickLook", - "subtype" : "44mm" + "scale" : "2x", + "size" : "129x129", + "subtype" : "49mm" }, { "idiom" : "watch-marketing", - "size" : "1024x1024", - "scale" : "1x" + "scale" : "1x", + "size" : "1024x1024" }, { - "size" : "44x44", "idiom" : "watch", - "scale" : "2x", "role" : "longLook", + "scale" : "2x", + "size" : "44x44", "subtype" : "42mm" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Circular.imageset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Circular.imageset/Contents.json new file mode 100644 index 000000000..482a808c5 --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Circular.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Contents.json new file mode 100644 index 000000000..e8b3252e3 --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Contents.json @@ -0,0 +1,53 @@ +{ + "assets" : [ + { + "filename" : "Circular.imageset", + "idiom" : "watch", + "role" : "circular" + }, + { + "filename" : "Extra Large.imageset", + "idiom" : "watch", + "role" : "extra-large" + }, + { + "filename" : "Graphic Bezel.imageset", + "idiom" : "watch", + "role" : "graphic-bezel" + }, + { + "filename" : "Graphic Circular.imageset", + "idiom" : "watch", + "role" : "graphic-circular" + }, + { + "filename" : "Graphic Corner.imageset", + "idiom" : "watch", + "role" : "graphic-corner" + }, + { + "filename" : "Graphic Extra Large.imageset", + "idiom" : "watch", + "role" : "graphic-extra-large" + }, + { + "filename" : "Graphic Large Rectangular.imageset", + "idiom" : "watch", + "role" : "graphic-large-rectangular" + }, + { + "filename" : "Modular.imageset", + "idiom" : "watch", + "role" : "modular" + }, + { + "filename" : "Utilitarian.imageset", + "idiom" : "watch", + "role" : "utilitarian" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json new file mode 100644 index 000000000..482a808c5 --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json new file mode 100644 index 000000000..042bdc77e --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json @@ -0,0 +1,17 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json new file mode 100644 index 000000000..042bdc77e --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json @@ -0,0 +1,17 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json new file mode 100644 index 000000000..042bdc77e --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json @@ -0,0 +1,17 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json new file mode 100644 index 000000000..482a808c5 --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Extra Large.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json new file mode 100644 index 000000000..042bdc77e --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json @@ -0,0 +1,17 @@ +{ + "images" : [ + { + "idiom" : "watch", + "scale" : "2x" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Contents.json new file mode 100644 index 000000000..f119686d7 --- /dev/null +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Contents.json @@ -0,0 +1,32 @@ +{ + "images" : [ + { + "filename" : "Modular Small Simple 38mm.png", + "idiom" : "watch", + "scale" : "2x", + "screen-width" : "<=145" + }, + { + "filename" : "Modular Small Simple 40mm and 42mm.png", + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, + { + "filename" : "Modular Small Simple 40mm and 42mm-1.png", + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">145" + }, + { + "filename" : "Modular Small Simple 44mm.png", + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Modular Small Simple 38mm.png b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Complication.complicationset/Modular.imageset/Modular Small Simple 38mm.png new file mode 100644 index 0000000000000000000000000000000000000000..2ac1c15337d9c68efb4bd95d87c9e8dc2ac2d4fe GIT binary patch literal 1396 zcmV-)1&jKLP)Wi;m5pH0&@a zBhCIPG6*s{&~g!}{wc7aKoW}nD6{OKi=dEllZ+@Uj1D3qTT7#@wgdBSGYah>yR*ak z{k9pIoqgZ^j<1HJC42>n6Z*cp*4WP!%sT>l?gF#m z1DFp3B16gY1>Cw5vTY^CRY{yXsCxoh6J5<}vpW<6Z=6?ck1l z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Contents.json b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Contents.json index da4a164c9..73c00596a 100644 --- a/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Contents.json +++ b/Sources/TestUtils/Fixtures/Resources/XCAssets/Other.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/other.yaml b/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/other.yaml new file mode 100644 index 000000000..95d26404e --- /dev/null +++ b/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/other.yaml @@ -0,0 +1,11 @@ +catalogs: +- assets: + - name: "Exclamation Mark" + type: "symbol" + value: "Exclamation Mark" + - name: "Plus" + type: "symbol" + value: "Plus" + name: "Symbols" +resourceCount: + symbol: 2 From 55603de88dd7215e14218c787ac8fbf3ced35433 Mon Sep 17 00:00:00 2001 From: Patrick Kladek Date: Thu, 9 Mar 2023 23:33:20 +0400 Subject: [PATCH 2/4] extend parser to include complicationset folder extension --- .../AssetsCatalog/AssetsCatalogParser.swift | 2 +- .../Parsers/AssetsCatalog/Catalog.swift | 5 ++- .../Parsers/AssetsCatalog/CatalogEntry.swift | 9 ++++ .../StencilContexts/XCAssets/all.yaml | 35 +++++++++++++++- .../StencilContexts/XCAssets/other.yaml | 41 +++++++++++++++---- .../SwiftGenKitTests/AssetCatalogTests.swift | 8 ++++ 6 files changed, 88 insertions(+), 12 deletions(-) diff --git a/Sources/SwiftGenKit/Parsers/AssetsCatalog/AssetsCatalogParser.swift b/Sources/SwiftGenKit/Parsers/AssetsCatalog/AssetsCatalogParser.swift index 50b0a2925..306fc63d4 100644 --- a/Sources/SwiftGenKit/Parsers/AssetsCatalog/AssetsCatalogParser.swift +++ b/Sources/SwiftGenKit/Parsers/AssetsCatalog/AssetsCatalogParser.swift @@ -18,7 +18,7 @@ public enum AssetsCatalog { self.warningHandler = warningHandler } - public static let defaultFilter = filterRegex(forExtensions: ["xcassets"]) + public static let defaultFilter = filterRegex(forExtensions: ["xcassets", "complicationset"]) public static let filterOptions: Filter.Options = [.skipsFiles, .skipsHiddenFiles, .skipsPackageDescendants] public func parse(path: Path, relativeTo parent: Path) throws { diff --git a/Sources/SwiftGenKit/Parsers/AssetsCatalog/Catalog.swift b/Sources/SwiftGenKit/Parsers/AssetsCatalog/Catalog.swift index f43badf28..8708f97da 100644 --- a/Sources/SwiftGenKit/Parsers/AssetsCatalog/Catalog.swift +++ b/Sources/SwiftGenKit/Parsers/AssetsCatalog/Catalog.swift @@ -26,7 +26,10 @@ extension AssetsCatalog.Catalog { /// This method recursively parses a directory structure, processing each folder (files are ignored). /// static func process(folder: Path, withPrefix prefix: String = "") -> [AssetsCatalogEntry] { - (try? folder.children().sorted(by: <).compactMap { path in + let children = try? folder.children() + let sorted = children?.sorted(by: <) + + return (sorted?.compactMap { path in AssetsCatalog.Entry.parse(path: path, withPrefix: prefix) }) ?? [] } diff --git a/Sources/SwiftGenKit/Parsers/AssetsCatalog/CatalogEntry.swift b/Sources/SwiftGenKit/Parsers/AssetsCatalog/CatalogEntry.swift index 6ba545afa..0258fec8d 100644 --- a/Sources/SwiftGenKit/Parsers/AssetsCatalog/CatalogEntry.swift +++ b/Sources/SwiftGenKit/Parsers/AssetsCatalog/CatalogEntry.swift @@ -92,6 +92,15 @@ extension AssetsCatalog.Entry { isNamespaced: isNamespaced, items: AssetsCatalog.Catalog.process(folder: path, withPrefix: subPrefix) ) + } else if type == "complicationset" { + print(path) + let filename = path.lastComponentWithoutExtension + + return AssetsCatalog.Entry.Group ( + name: filename, + isNamespaced: true, + items: AssetsCatalog.Catalog.process(folder: path, withPrefix: "\(prefix)\(filename)/") + ) } else { // Unknown extension return nil diff --git a/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/all.yaml b/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/all.yaml index 28594b488..ead4d05a7 100644 --- a/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/all.yaml +++ b/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/all.yaml @@ -61,7 +61,38 @@ catalogs: type: "image" value: "private" name: "Food" -- assets: [] +- assets: + - isNamespaced: "true" + name: "Complication" + type: "group" + items: + - name: "Circular" + type: "image" + value: "Complication/Circular" + - name: "Extra Large" + type: "image" + value: "Complication/Extra Large" + - name: "Graphic Bezel" + type: "image" + value: "Complication/Graphic Bezel" + - name: "Graphic Circular" + type: "image" + value: "Complication/Graphic Circular" + - name: "Graphic Corner" + type: "image" + value: "Complication/Graphic Corner" + - name: "Graphic Extra Large" + type: "image" + value: "Complication/Graphic Extra Large" + - name: "Graphic Large Rectangular" + type: "image" + value: "Complication/Graphic Large Rectangular" + - name: "Modular" + type: "image" + value: "Complication/Modular" + - name: "Utilitarian" + type: "image" + value: "Complication/Utilitarian" name: "Other" - assets: - isNamespaced: "true" @@ -111,5 +142,5 @@ resourceCount: arresourcegroup: 3 color: 4 data: 3 - image: 8 + image: 17 symbol: 2 diff --git a/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/other.yaml b/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/other.yaml index 95d26404e..90f86cb4a 100644 --- a/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/other.yaml +++ b/Sources/TestUtils/Fixtures/StencilContexts/XCAssets/other.yaml @@ -1,11 +1,36 @@ catalogs: - assets: - - name: "Exclamation Mark" - type: "symbol" - value: "Exclamation Mark" - - name: "Plus" - type: "symbol" - value: "Plus" - name: "Symbols" + - isNamespaced: "true" + name: "Complication" + type: "group" + items: + - name: "Circular" + type: "image" + value: "Complication/Circular" + - name: "Extra Large" + type: "image" + value: "Complication/Extra Large" + - name: "Graphic Bezel" + type: "image" + value: "Complication/Graphic Bezel" + - name: "Graphic Circular" + type: "image" + value: "Complication/Graphic Circular" + - name: "Graphic Corner" + type: "image" + value: "Complication/Graphic Corner" + - name: "Graphic Extra Large" + type: "image" + value: "Complication/Graphic Extra Large" + - name: "Graphic Large Rectangular" + type: "image" + value: "Complication/Graphic Large Rectangular" + - name: "Modular" + type: "image" + value: "Complication/Modular" + - name: "Utilitarian" + type: "image" + value: "Complication/Utilitarian" + name: "Other" resourceCount: - symbol: 2 + image: 9 diff --git a/Tests/SwiftGenKitTests/AssetCatalogTests.swift b/Tests/SwiftGenKitTests/AssetCatalogTests.swift index 430d83cd7..6627dfa9e 100644 --- a/Tests/SwiftGenKitTests/AssetCatalogTests.swift +++ b/Tests/SwiftGenKitTests/AssetCatalogTests.swift @@ -57,6 +57,14 @@ final class AssetCatalogTests: XCTestCase { XCTDiffContexts(result, expected: "symbols", sub: .xcassets) } + func testOther() throws { + let parser = try AssetsCatalog.Parser() + try parser.searchAndParse(path: Fixtures.resource(for: "Other.xcassets", sub: .xcassets)) + + let result = parser.stencilContext() + XCTDiffContexts(result, expected: "other", sub: .xcassets) + } + func testAll() throws { let parser = try AssetsCatalog.Parser() let paths = [ From 1542266fb2c4c66f0d99632991e77cb7b19ef161 Mon Sep 17 00:00:00 2001 From: Patrick Kladek Date: Thu, 9 Mar 2023 23:39:57 +0400 Subject: [PATCH 3/4] add changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7326fcf4..5e042fbb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ --- +### New Features + +* XCAssets: the parser now supports complicationset set, so you can use watchOS complications in asset cataloge. + [Patrick Kladek](https://github.com/Patrick-Kladek) + [#1051](https://github.com/SwiftGen/SwiftGen/pull/1051) + + ## 6.6.2 ### Changes in core dependencies of SwiftGen From 69ac7ba68cad03634fb9f7173dac5abe400718ab Mon Sep 17 00:00:00 2001 From: Patrick Kladek Date: Thu, 9 Mar 2023 23:42:11 +0400 Subject: [PATCH 4/4] remove merge conflict marker in changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e1678670..ef38ffc47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,6 @@ _None_ ### Internal Changes _None_ ->>>>>>> 46a6c907000ba475b1cde6672508e1deaff5debc ## 6.6.2