diff --git a/Sources/SWBApplePlatform/ActoolInputFileGroupingStrategy.swift b/Sources/SWBApplePlatform/ActoolInputFileGroupingStrategy.swift index 97410e4c..daf36099 100644 --- a/Sources/SWBApplePlatform/ActoolInputFileGroupingStrategy.swift +++ b/Sources/SWBApplePlatform/ActoolInputFileGroupingStrategy.swift @@ -33,7 +33,8 @@ import Foundation // TODO Should we make this a property of the product type? guard context.productType?.identifier == "com.apple.product-type.app-extension.messages-sticker-pack" else { return [] } - let catalogFileTypes = ["folder.assetcatalog", "folder.stickers"].map { context.lookupFileType(identifier: $0)! } + let fileTypes = ["folder.assetcatalog", "folder.stickers", "folder.iconcomposer.icon"] + let catalogFileTypes = fileTypes.map { context.lookupFileType(identifier: $0)! } let stringsFileType = context.lookupFileType(identifier: "text.plist.strings")! let catalogPaths = target.files.compactMap { ftb in catalogFileTypes.contains { ftb.fileType.conformsTo($0) } ? ftb.absolutePath : nil } diff --git a/Sources/SWBApplePlatform/AssetCatalogCompiler.swift b/Sources/SWBApplePlatform/AssetCatalogCompiler.swift index ac390469..c253b047 100644 --- a/Sources/SWBApplePlatform/AssetCatalogCompiler.swift +++ b/Sources/SWBApplePlatform/AssetCatalogCompiler.swift @@ -143,7 +143,8 @@ public final class ActoolCompilerSpec : GenericCompilerSpec, SpecIdentifierType, specialArgs += ["--platform", platformName] // File types - let catalogFileTypes = ["folder.assetcatalog", "folder.stickers"].map { cbc.producer.lookupFileType(identifier: $0)! } + let fileTypes = ["folder.assetcatalog", "folder.stickers", "folder.iconcomposer.icon"] + let catalogFileTypes = fileTypes.map { cbc.producer.lookupFileType(identifier: $0)! } let stringsFileType = cbc.producer.lookupFileType(identifier: "text.plist.strings")! // Construct the command line using this custom lookup function. diff --git a/Sources/SWBApplePlatform/Specs/AssetCatalogCompiler.xcspec b/Sources/SWBApplePlatform/Specs/AssetCatalogCompiler.xcspec index b7abfbb4..e1d5926b 100644 --- a/Sources/SWBApplePlatform/Specs/AssetCatalogCompiler.xcspec +++ b/Sources/SWBApplePlatform/Specs/AssetCatalogCompiler.xcspec @@ -24,6 +24,7 @@ folder.assetcatalog, folder.imagecatalog, folder.stickers, + folder.iconcomposer.icon, ); DeeplyStatInputDirectories = YES; InputFileGroupings = ( diff --git a/Sources/SWBCore/Specs/CoreBuildSystem.xcspec b/Sources/SWBCore/Specs/CoreBuildSystem.xcspec index d89f2142..0514414a 100644 --- a/Sources/SWBCore/Specs/CoreBuildSystem.xcspec +++ b/Sources/SWBCore/Specs/CoreBuildSystem.xcspec @@ -161,7 +161,7 @@ { Name = "EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES"; Type = stringlist; - DefaultValue = "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"; + DefaultValue = "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"; }, { Name = "PRECOMP_DESTINATION_DIR"; @@ -1194,6 +1194,7 @@ When `GENERATE_INFOPLIST_FILE` is enabled, sets the value of the [CFBundleIdenti Name = "EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES"; Type = StringList; Category = "Search Paths"; + DefaultValue = "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"; DefaultValue = "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"; }, { diff --git a/Sources/SWBCore/Specs/NativeBuildSystem.xcspec b/Sources/SWBCore/Specs/NativeBuildSystem.xcspec index 1e36b300..b4fcfa8a 100644 --- a/Sources/SWBCore/Specs/NativeBuildSystem.xcspec +++ b/Sources/SWBCore/Specs/NativeBuildSystem.xcspec @@ -294,7 +294,7 @@ When `GENERATE_INFOPLIST_FILE` is enabled, sets the value of the [CFBundleExecut }, { Name = EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES; Type = StringList; - DefaultValue = "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"; + DefaultValue = "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"; Category = "Search Paths"; }, { Name = RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS; diff --git a/Sources/SWBCore/Specs/en.lproj/CoreBuildSystem.strings b/Sources/SWBCore/Specs/en.lproj/CoreBuildSystem.strings index a33cfc4a..4aeafd33 100644 --- a/Sources/SWBCore/Specs/en.lproj/CoreBuildSystem.strings +++ b/Sources/SWBCore/Specs/en.lproj/CoreBuildSystem.strings @@ -85,7 +85,7 @@ For backwards compatibility reasons, this setting is enabled by default. Disabli "[INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES]-description" = "This is a list of `fnmatch()`-style patterns of file or directory names to include when performing a recursive search. By default, this is empty and is only customized when you want to provide exceptions to the list of filename patterns provided in `EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES`."; "[EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES]-name" = "Sub-Directories to Exclude in Recursive Searches"; -"[EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES]-description" = "This is a list of `fnmatch()`-style patterns of file or directory names to exclude when performing a recursive search. By default, this is set to `*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj`. Normally, if you override this value you should include the default values via the `$(inherited)` macro."; +"[EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES]-description" = "This is a list of `fnmatch()`-style patterns of file or directory names to exclude when performing a recursive search. By default, this is set to `*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj`. Normally, if you override this value you should include the default values via the `$(inherited)` macro."; "[USE_HEADERMAP]-name" = "Use Header Maps"; "[USE_HEADERMAP]-description" = "Enable the use of *Header Maps*, which provide the compiler with a mapping from textual header names to their locations, bypassing the normal compiler header search path mechanisms. This allows source code to include headers from various locations in the file system without needing to update the header search path build settings."; diff --git a/Sources/SWBProjectModel/IDE/IDESwiftPackageExtensions.swift b/Sources/SWBProjectModel/IDE/IDESwiftPackageExtensions.swift index 2db34cf5..2e8b1faa 100644 --- a/Sources/SWBProjectModel/IDE/IDESwiftPackageExtensions.swift +++ b/Sources/SWBProjectModel/IDE/IDESwiftPackageExtensions.swift @@ -97,6 +97,8 @@ extension PIF.FileReference : PIFRepresentable { // FIXME: This is probably now more important because of resources support. case "xcassets": return "folder.assetcatalog" + case "icon": + return "folder.iconcomposer.icon" case "xcstrings": return "text.json.xcstrings" case "storyboard": diff --git a/Sources/SWBTestSupport/TestWorkspaces.swift b/Sources/SWBTestSupport/TestWorkspaces.swift index c225eb2c..669eab23 100644 --- a/Sources/SWBTestSupport/TestWorkspaces.swift +++ b/Sources/SWBTestSupport/TestWorkspaces.swift @@ -283,6 +283,8 @@ package final class TestFile: TestInternalStructureItem, CustomStringConvertible return "file.uicatalog" case ".xcassets": return "folder.assetcatalog" + case ".icon": + return "folder.iconcomposer.icon" case ".xcdatamodeld": return "wrapper.xcdatamodel" case ".xcfilelist": diff --git a/Sources/SWBUniversalPlatform/Specs/StandardFileTypes.xcspec b/Sources/SWBUniversalPlatform/Specs/StandardFileTypes.xcspec index 5001cacd..490c60f6 100644 --- a/Sources/SWBUniversalPlatform/Specs/StandardFileTypes.xcspec +++ b/Sources/SWBUniversalPlatform/Specs/StandardFileTypes.xcspec @@ -1413,6 +1413,16 @@ UTI = "com.apple.dt.stickers"; }, + { + // Icon Composer icons are not really wrappers according to launch services, but we treat them like wrappers in Xcode as we want them to be opaque + Type = FileType; + Identifier = folder.iconcomposer.icon; + BasedOn = folder.abstractassetcatalog; + Extensions = (icon); + IsTransparent = NO; + UTI = "com.apple.iconcomposer.icon"; + }, + // Archive file types { Type = FileType; diff --git a/Sources/SwiftBuild/ProjectModel/References.swift b/Sources/SwiftBuild/ProjectModel/References.swift index cc4cd8a8..81921cf8 100644 --- a/Sources/SwiftBuild/ProjectModel/References.swift +++ b/Sources/SwiftBuild/ProjectModel/References.swift @@ -216,6 +216,8 @@ extension ProjectModel.FileReference: Codable { // FIXME: This is probably now more important because of resources support. case "xcassets": return "folder.assetcatalog" + case "icon": + return "folder.iconcomposer.icon" case "xcstrings": return "text.json.xcstrings" case "storyboard": diff --git a/Tests/SWBTaskConstructionTests/AssetCatalogTaskConstructionTests.swift b/Tests/SWBTaskConstructionTests/AssetCatalogTaskConstructionTests.swift index 45b860eb..fa12c93f 100644 --- a/Tests/SWBTaskConstructionTests/AssetCatalogTaskConstructionTests.swift +++ b/Tests/SWBTaskConstructionTests/AssetCatalogTaskConstructionTests.swift @@ -22,15 +22,24 @@ import SWBTaskConstruction @Suite fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { func assetCatalogThinningTestProject(tmpDir: Path, thinningBuildSettings: [String: String]) async throws -> TestProject { + let testGroupChildren = [ + TestFile("Test.swift"), + TestFile("Assets.xcassets"), + TestFile("Icon.icon"), + ] + + let testResourceBuildPhaseFiles = [ + TestBuildFile("Assets.xcassets"), + TestBuildFile("Icon.icon"), + ] + + return try await TestProject( "aProject", sourceRoot: tmpDir, groupTree: TestGroup( "SomeFiles", - children: [ - TestFile("Test.swift"), - TestFile("Assets.xcassets"), - ]), + children: testGroupChildren), buildConfigurations: [ TestBuildConfiguration( "Debug", @@ -60,9 +69,7 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { TestSourcesBuildPhase([ TestBuildFile("Test.swift"), ]), - TestResourcesBuildPhase([ - TestBuildFile("Assets.xcassets"), - ]), + TestResourcesBuildPhase(testResourceBuildPhaseFiles), ] ), ], classPrefix: "XC") @@ -82,36 +89,44 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { await tester.checkBuild(runDestination: .iOS) { results in results.checkTask(.matchRuleType("CompileAssetCatalogVariant"), .matchRuleItem("thinned")) { task in - task.checkCommandLine([actoolPath.str, - "\(SRCROOT)/Assets.xcassets", - "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/thinned", - "--output-format", "human-readable-text", - "--notices", "--warnings", - "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_thinned", - "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_thinned", - "--compress-pngs", - "--enable-on-demand-resources", "NO", - "--filter-for-thinning-device-configuration", "myPhoneABCD,10-B", - "--filter-for-device-os-version", "12.1235", - "--development-region", "English", - "--target-device", "iphone", - "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, - "--platform", "iphoneos",]) + let commandLine = [ + actoolPath.str, + "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", + "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/thinned", + "--output-format", "human-readable-text", + "--notices", "--warnings", + "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_thinned", + "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_thinned", + "--compress-pngs", + "--enable-on-demand-resources", "NO", + "--filter-for-thinning-device-configuration", "myPhoneABCD,10-B", + "--filter-for-device-os-version", "12.1235", + "--development-region", "English", + "--target-device", "iphone", + "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, + "--platform", "iphoneos", + ] + task.checkCommandLine(commandLine) } results.checkTask(.matchRuleType("CompileAssetCatalogVariant"), .matchRuleItem("unthinned")) { task in - task.checkCommandLine([actoolPath.str, - "\(SRCROOT)/Assets.xcassets", - "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/unthinned", - "--output-format", "human-readable-text", - "--notices", "--warnings", - "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_unthinned", - "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_unthinned", - "--compress-pngs", - "--enable-on-demand-resources", "NO", - "--development-region", "English", - "--target-device", "iphone", - "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, - "--platform", "iphoneos",]) + let commandLine = [ + actoolPath.str, + "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", + "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/unthinned", + "--output-format", "human-readable-text", + "--notices", "--warnings", + "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_unthinned", + "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_unthinned", + "--compress-pngs", + "--enable-on-demand-resources", "NO", + "--development-region", "English", + "--target-device", "iphone", + "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, + "--platform", "iphoneos", + ] + task.checkCommandLine(commandLine) } results.checkNoDiagnostics() @@ -134,39 +149,45 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { await tester.checkBuild(runDestination: .iOS) { results in results.checkTask(.matchRuleType("CompileAssetCatalogVariant"), .matchRuleItem("thinned")) { task in - task.checkCommandLine([actoolPath.str, - "\(SRCROOT)/Assets.xcassets", - "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/thinned", - "--output-format", "human-readable-text", - "--notices", "--warnings", - "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_thinned", - "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_thinned", - "--compress-pngs", - "--enable-on-demand-resources", "NO", - "--filter-for-thinning-device-configuration", "myPhoneFooBar12,3-B", - // --filter-for-device-model should be hidden because of ASSETCATALOG_FILTER_FOR_THINNING_DEVICE_CONFIGURATION - "--filter-for-device-os-version", "13.2", - "--development-region", "English", - "--target-device", "iphone", - "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, - "--platform", "iphoneos", - ]) + let commandLine = [ + actoolPath.str, + "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", + "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/thinned", + "--output-format", "human-readable-text", + "--notices", "--warnings", + "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_thinned", + "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_thinned", + "--compress-pngs", + "--enable-on-demand-resources", "NO", + "--filter-for-thinning-device-configuration", "myPhoneFooBar12,3-B", + // --filter-for-device-model should be hidden because of ASSETCATALOG_FILTER_FOR_THINNING_DEVICE_CONFIGURATION + "--filter-for-device-os-version", "13.2", + "--development-region", "English", + "--target-device", "iphone", + "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, + "--platform", "iphoneos", + ] + task.checkCommandLine(commandLine) } results.checkTask(.matchRuleType("CompileAssetCatalogVariant"), .matchRuleItem("unthinned")) { task in - task.checkCommandLine([actoolPath.str, - "\(SRCROOT)/Assets.xcassets", - "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/unthinned", - "--output-format", "human-readable-text", - "--notices", "--warnings", - "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_unthinned", - "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_unthinned", - "--compress-pngs", - "--enable-on-demand-resources", "NO", - "--development-region", "English", - "--target-device", "iphone", - "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, - "--platform", "iphoneos", - ]) + let commandLine = [ + actoolPath.str, + "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", + "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/unthinned", + "--output-format", "human-readable-text", + "--notices", "--warnings", + "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_unthinned", + "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_unthinned", + "--compress-pngs", + "--enable-on-demand-resources", "NO", + "--development-region", "English", + "--target-device", "iphone", + "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, + "--platform", "iphoneos", + ] + task.checkCommandLine(commandLine) } results.checkNoDiagnostics() @@ -188,39 +209,45 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { await tester.checkBuild(runDestination: .iOS) { results in results.checkTask(.matchRuleType("CompileAssetCatalogVariant"), .matchRuleItem("thinned")) { task in - task.checkCommandLine([actoolPath.str, - "\(SRCROOT)/Assets.xcassets", - "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/thinned", - "--output-format", "human-readable-text", - "--notices", "--warnings", - "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_thinned", - "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_thinned", - "--compress-pngs", - "--enable-on-demand-resources", "NO", - "--filter-for-device-model", "myPhoneFooBar12,3", - "--filter-for-device-os-version", "13.2", - "--development-region", "English", - "--target-device", "iphone", - "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, - "--platform", "iphoneos", - ]) + let commandLine = [ + actoolPath.str, + "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", + "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/thinned", + "--output-format", "human-readable-text", + "--notices", "--warnings", + "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_thinned", + "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_thinned", + "--compress-pngs", + "--enable-on-demand-resources", "NO", + "--filter-for-device-model", "myPhoneFooBar12,3", + "--filter-for-device-os-version", "13.2", + "--development-region", "English", + "--target-device", "iphone", + "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, + "--platform", "iphoneos", + ] + task.checkCommandLine(commandLine) } results.checkTask(.matchRuleType("CompileAssetCatalogVariant"), .matchRuleItem("unthinned")) { task in - task.checkCommandLine([actoolPath.str, - "\(SRCROOT)/Assets.xcassets", - "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/unthinned", - "--output-format", "human-readable-text", - "--notices", "--warnings", - "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_unthinned", - "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_unthinned", - "--compress-pngs", - "--enable-on-demand-resources", "NO", - "--development-region", "English", - "--target-device", "iphone", - "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, - "--platform", "iphoneos", - ]) + let commandLine = [ + actoolPath.str, + "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", + "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/unthinned", + "--output-format", "human-readable-text", + "--notices", "--warnings", + "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_unthinned", + "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_unthinned", + "--compress-pngs", + "--enable-on-demand-resources", "NO", + "--development-region", "English", + "--target-device", "iphone", + "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, + "--platform", "iphoneos", + ] + task.checkCommandLine(commandLine) } results.checkNoDiagnostics() @@ -241,20 +268,23 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { await tester.checkBuild(runDestination: .iOS) { results in for variant in ["thinned", "unthinned"] { results.checkTask(.matchRuleType("CompileAssetCatalogVariant"), .matchRuleItem(variant)) { task in - task.checkCommandLine([actoolPath.str, - "\(SRCROOT)/Assets.xcassets", - "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/\(variant)", - "--output-format", "human-readable-text", - "--notices", "--warnings", - "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_\(variant)", - "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_\(variant)", - "--compress-pngs", - "--enable-on-demand-resources", "NO", - "--development-region", "English", - "--target-device", "iphone", - "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, - "--platform", "iphoneos", - ]) + let commandLine = [ + actoolPath.str, + "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", + "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/\(variant)", + "--output-format", "human-readable-text", + "--notices", "--warnings", + "--export-dependency-info", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_dependencies_\(variant)", + "--output-partial-info-plist", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_generated_info.plist_\(variant)", + "--compress-pngs", + "--enable-on-demand-resources", "NO", + "--development-region", "English", + "--target-device", "iphone", + "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, + "--platform", "iphoneos", + ] + task.checkCommandLine(commandLine) } } @@ -277,6 +307,7 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { for variant in ["thinned", "unthinned"] { let actoolCommandLine = try await [actoolPath.str, "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/\(variant)", "--output-format", "human-readable-text", "--notices", "--warnings", @@ -297,6 +328,7 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { let actoolCommandLine = try await [actoolPath.str, "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", "--compile", "\(SRCROOT)/build/Debug-iphoneos/App.framework", "--output-format", "human-readable-text", "--notices", "--warnings", @@ -308,7 +340,7 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { "--target-device", "iphone", "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, "--platform", "iphoneos", - ] + ] let symbolsArgs = ["--bundle-identifier", "com.apple.project", "--generate-swift-asset-symbol-extensions", "NO", @@ -351,6 +383,7 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { for variant in ["thinned", "unthinned"] { let actoolCommandLine = try await [actoolPath.str, "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", "--compile", "\(SRCROOT)/build/aProject.build/Debug-iphoneos/App.build/assetcatalog_output/\(variant)", "--output-format", "human-readable-text", "--notices", "--warnings", @@ -371,6 +404,7 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { let actoolCommandLine = try await [actoolPath.str, "\(SRCROOT)/Assets.xcassets", + "\(SRCROOT)/Icon.icon", "--compile", "\(SRCROOT)/build/Debug-iphoneos/App.framework", "--output-format", "human-readable-text", "--notices", "--warnings", @@ -382,7 +416,7 @@ fileprivate struct AssetCatalogTaskConstructionTests: CoreBasedTests { "--target-device", "iphone", "--minimum-deployment-target", results.runDestinationSDK.defaultDeploymentTarget, "--platform", "iphoneos", - ] + ] let symbolsArgs = ["--bundle-identifier", "com.apple.project", "--generate-asset-symbol-warnings", "NO",