diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9d77873..87660098 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,13 +8,13 @@ on: jobs: release: name: Publish GitHub and Cocoapods release - runs-on: macos-12 + runs-on: macos-13 steps: - name: Checkout uses: actions/checkout@v2 - name: Select Xcode version - run: sudo xcode-select --switch /Applications/Xcode_14.1.app + run: sudo xcode-select --switch /Applications/Xcode_15.2.app - name: Build run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac1ea6b3..b6eec045 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,12 +14,12 @@ on: jobs: test: name: Run tests on macOS - runs-on: macos-12 + runs-on: macos-13 steps: - name: Checkout uses: actions/checkout@v2 - name: Select Xcode version - run: sudo xcode-select --switch /Applications/Xcode_14.1.app + run: sudo xcode-select --switch /Applications/Xcode_15.2.app - name: Build and test run: swift test --enable-code-coverage --disable-automatic-resolution shell: bash diff --git a/Sources/XcodeExport/Model/XcodeExportExtensions.swift b/Sources/XcodeExport/Model/XcodeExportExtensions.swift index 24142c0b..1ab3d95b 100644 --- a/Sources/XcodeExport/Model/XcodeExportExtensions.swift +++ b/Sources/XcodeExport/Model/XcodeExportExtensions.swift @@ -49,7 +49,7 @@ extension XcodeAssetContents { func makeFileContents(to directory: URL) throws -> FileContents { let encoder = JSONEncoder() - encoder.outputFormatting = .prettyPrinted + encoder.outputFormatting = [.prettyPrinted, .sortedKeys] let data = try encoder.encode(self) let fileURL = URL(string: "Contents.json")! diff --git a/Sources/XcodeExport/XcodeColorExporter.swift b/Sources/XcodeExport/XcodeColorExporter.swift index f8d2b80c..b9da3038 100644 --- a/Sources/XcodeExport/XcodeColorExporter.swift +++ b/Sources/XcodeExport/XcodeColorExporter.swift @@ -219,7 +219,7 @@ final public class XcodeColorExporter: XcodeExporterBase { private func makeXcodeAssetFileContents(contents: XcodeAssetContents, directory: URL) throws -> FileContents { let encoder = JSONEncoder() - encoder.outputFormatting = .prettyPrinted + encoder.outputFormatting = [.prettyPrinted, .sortedKeys] let data = try encoder.encode(contents) let fileURL = URL(string: "Contents.json")! return FileContents( diff --git a/Tests/XcodeExportTests/XcodeIconsExporterTests.swift b/Tests/XcodeExportTests/XcodeIconsExporterTests.swift index c32be6a4..64ba1440 100644 --- a/Tests/XcodeExportTests/XcodeIconsExporterTests.swift +++ b/Tests/XcodeExportTests/XcodeIconsExporterTests.swift @@ -667,17 +667,17 @@ final class XcodeIconsExporterTests: XCTestCase { { "images" : [ { - "idiom" : "universal", - "filename" : "ic24TabBarHome.pdf" + "filename" : "ic24TabBarHome.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 }, "properties" : { - "template-rendering-intent" : "template", - "preserves-vector-representation" : true + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" } } """ @@ -711,17 +711,17 @@ final class XcodeIconsExporterTests: XCTestCase { { "images" : [ { - "idiom" : "universal", - "filename" : "ic24TabBarHome.pdf" + "filename" : "ic24TabBarHome.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 }, "properties" : { - "template-rendering-intent" : "template", - "preserves-vector-representation" : true + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" } } """