From c22513e79447cae804426cd90257dc936c3b80bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-E=CC=81tienne?= Date: Sun, 10 Feb 2019 13:32:47 +1100 Subject: [PATCH 1/2] Moving on to using Swift Package Manager --- AssetResizer.xcodeproj/project.pbxproj | 178 +++++++++--------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + AssetResizer/Info.plist | 26 --- AssetResizerTests/Info.plist | 22 --- Package.swift | 28 +++ .../AssetResizer}/AppIconSet.swift | 0 .../AssetResizer}/NSImage+Resizing.swift | 0 .../AssetResizer}/NSImage+Saving.swift | 0 .../AssetResizer}/ResizedImage.swift | 0 .../AssetResizerTests}/AppIconSetTests.swift | 0 .../AssetResizerTests.swift | 4 +- .../ResizedImageTests.swift | 0 .../SizeDescriptionTests.swift | 0 .../Tools/Bundle+Tests.swift | 0 .../AssetResizerTests}/Tools/TestData.swift | 0 .../Tools/URL+TempFolder.swift | 0 Tests/AssetResizerTests/XCTestManifests.swift | 9 + .../test-data/SampleAppIcon.appiconset.zip | Bin .../test-data/iOS/sample-blue-app-icon.png | Bin .../test-data/iOS/sample-red-app-icon.png | Bin Tests/LinuxMain.swift | 7 + 21 files changed, 143 insertions(+), 139 deletions(-) create mode 100644 AssetResizer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 AssetResizer/Info.plist delete mode 100644 AssetResizerTests/Info.plist create mode 100644 Package.swift rename {AssetResizer => Sources/AssetResizer}/AppIconSet.swift (100%) rename {AssetResizer => Sources/AssetResizer}/NSImage+Resizing.swift (100%) rename {AssetResizer => Sources/AssetResizer}/NSImage+Saving.swift (100%) rename {AssetResizer => Sources/AssetResizer}/ResizedImage.swift (100%) rename {AssetResizerTests => Tests/AssetResizerTests}/AppIconSetTests.swift (100%) rename {AssetResizerTests => Tests/AssetResizerTests}/AssetResizerTests.swift (73%) rename {AssetResizerTests => Tests/AssetResizerTests}/ResizedImageTests.swift (100%) rename {AssetResizerTests => Tests/AssetResizerTests}/SizeDescriptionTests.swift (100%) rename {AssetResizerTests => Tests/AssetResizerTests}/Tools/Bundle+Tests.swift (100%) rename {AssetResizerTests => Tests/AssetResizerTests}/Tools/TestData.swift (100%) rename {AssetResizerTests => Tests/AssetResizerTests}/Tools/URL+TempFolder.swift (100%) create mode 100644 Tests/AssetResizerTests/XCTestManifests.swift rename {AssetResizerTests => Tests/AssetResizerTests}/test-data/SampleAppIcon.appiconset.zip (100%) rename {AssetResizerTests => Tests/AssetResizerTests}/test-data/iOS/sample-blue-app-icon.png (100%) rename {AssetResizerTests => Tests/AssetResizerTests}/test-data/iOS/sample-red-app-icon.png (100%) create mode 100644 Tests/LinuxMain.swift diff --git a/AssetResizer.xcodeproj/project.pbxproj b/AssetResizer.xcodeproj/project.pbxproj index 06242c7..39d6a22 100644 --- a/AssetResizer.xcodeproj/project.pbxproj +++ b/AssetResizer.xcodeproj/project.pbxproj @@ -7,21 +7,22 @@ objects = { /* Begin PBXBuildFile section */ - F7363ED61EE531DD005BA675 /* ResizedImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7363ED51EE531DD005BA675 /* ResizedImageTests.swift */; }; - F7678EF61EE550A60089FAF7 /* SizeDescriptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7678EF51EE550A60089FAF7 /* SizeDescriptionTests.swift */; }; - F7678EFB1EE558160089FAF7 /* SampleAppIcon.appiconset.zip in Resources */ = {isa = PBXBuildFile; fileRef = F7678EFA1EE558160089FAF7 /* SampleAppIcon.appiconset.zip */; }; - F7678EFD1EE5717A0089FAF7 /* URL+TempFolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7678EFC1EE5717A0089FAF7 /* URL+TempFolder.swift */; }; + F757D81B220FC3560060A62E /* AppIconSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D817220FC3560060A62E /* AppIconSet.swift */; }; + F757D81C220FC3560060A62E /* NSImage+Saving.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D818220FC3560060A62E /* NSImage+Saving.swift */; }; + F757D81D220FC3560060A62E /* ResizedImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D819220FC3560060A62E /* ResizedImage.swift */; }; + F757D81E220FC3560060A62E /* NSImage+Resizing.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D81A220FC3560060A62E /* NSImage+Resizing.swift */; }; + F757D833220FC36B0060A62E /* sample-red-app-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F757D826220FC36B0060A62E /* sample-red-app-icon.png */; }; + F757D834220FC36B0060A62E /* sample-blue-app-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F757D827220FC36B0060A62E /* sample-blue-app-icon.png */; }; + F757D835220FC36B0060A62E /* SampleAppIcon.appiconset.zip in Resources */ = {isa = PBXBuildFile; fileRef = F757D828220FC36B0060A62E /* SampleAppIcon.appiconset.zip */; }; + F757D838220FC36B0060A62E /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D82B220FC36B0060A62E /* XCTestManifests.swift */; }; + F757D83D220FC4560060A62E /* AppIconSetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D82C220FC36B0060A62E /* AppIconSetTests.swift */; }; + F757D83E220FC4560060A62E /* AssetResizerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D82D220FC36B0060A62E /* AssetResizerTests.swift */; }; + F757D83F220FC4560060A62E /* ResizedImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D82E220FC36B0060A62E /* ResizedImageTests.swift */; }; + F757D840220FC4560060A62E /* SizeDescriptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D82A220FC36B0060A62E /* SizeDescriptionTests.swift */; }; + F757D841220FC4560060A62E /* URL+TempFolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D821220FC36B0060A62E /* URL+TempFolder.swift */; }; + F757D842220FC4560060A62E /* TestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D822220FC36B0060A62E /* TestData.swift */; }; + F757D843220FC4560060A62E /* Bundle+Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F757D823220FC36B0060A62E /* Bundle+Tests.swift */; }; F79678ED1EDFD14600AC0948 /* AssetResizer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F79678E31EDFD14600AC0948 /* AssetResizer.framework */; }; - F79679001EDFD6A600AC0948 /* AssetResizerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F79678FF1EDFD6A600AC0948 /* AssetResizerTests.swift */; }; - F7F0E33F1EDFE9D500E09A9A /* NSImage+Resizing.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F0E33E1EDFE9D500E09A9A /* NSImage+Resizing.swift */; }; - F7F0E3421EE0011C00E09A9A /* NSImage+Saving.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F0E3411EE0011C00E09A9A /* NSImage+Saving.swift */; }; - F7F0E34F1EE0388300E09A9A /* sample-blue-app-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F7F0E34D1EE0388300E09A9A /* sample-blue-app-icon.png */; }; - F7F0E3501EE0388300E09A9A /* sample-red-app-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F7F0E34E1EE0388300E09A9A /* sample-red-app-icon.png */; }; - F7F0E3531EE0390500E09A9A /* Bundle+Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F0E3521EE0390500E09A9A /* Bundle+Tests.swift */; }; - F7F0E3551EE0390E00E09A9A /* TestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F0E3541EE0390E00E09A9A /* TestData.swift */; }; - F7F0E3571EE0462800E09A9A /* ResizedImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F0E3561EE0462800E09A9A /* ResizedImage.swift */; }; - F7F0E3591EE14C0B00E09A9A /* AppIconSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F0E3581EE14C0B00E09A9A /* AppIconSet.swift */; }; - F7F0E35B1EE153EB00E09A9A /* AppIconSetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F0E35A1EE153EB00E09A9A /* AppIconSetTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -38,24 +39,25 @@ F70398691EE6D347003F2AD6 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; F703986A1EE6D347003F2AD6 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; F703986C1EE6D7A7003F2AD6 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = ""; }; - F7363ED51EE531DD005BA675 /* ResizedImageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResizedImageTests.swift; sourceTree = ""; }; - F7678EF51EE550A60089FAF7 /* SizeDescriptionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SizeDescriptionTests.swift; sourceTree = ""; }; - F7678EFA1EE558160089FAF7 /* SampleAppIcon.appiconset.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SampleAppIcon.appiconset.zip; sourceTree = ""; }; - F7678EFC1EE5717A0089FAF7 /* URL+TempFolder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "URL+TempFolder.swift"; sourceTree = ""; }; + F757D815220FC3490060A62E /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + F757D817220FC3560060A62E /* AppIconSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppIconSet.swift; sourceTree = ""; }; + F757D818220FC3560060A62E /* NSImage+Saving.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSImage+Saving.swift"; sourceTree = ""; }; + F757D819220FC3560060A62E /* ResizedImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResizedImage.swift; sourceTree = ""; }; + F757D81A220FC3560060A62E /* NSImage+Resizing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSImage+Resizing.swift"; sourceTree = ""; }; + F757D821220FC36B0060A62E /* URL+TempFolder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "URL+TempFolder.swift"; sourceTree = ""; }; + F757D822220FC36B0060A62E /* TestData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestData.swift; sourceTree = ""; }; + F757D823220FC36B0060A62E /* Bundle+Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+Tests.swift"; sourceTree = ""; }; + F757D826220FC36B0060A62E /* sample-red-app-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sample-red-app-icon.png"; sourceTree = ""; }; + F757D827220FC36B0060A62E /* sample-blue-app-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sample-blue-app-icon.png"; sourceTree = ""; }; + F757D828220FC36B0060A62E /* SampleAppIcon.appiconset.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SampleAppIcon.appiconset.zip; sourceTree = ""; }; + F757D82A220FC36B0060A62E /* SizeDescriptionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SizeDescriptionTests.swift; sourceTree = ""; }; + F757D82B220FC36B0060A62E /* XCTestManifests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; + F757D82C220FC36B0060A62E /* AppIconSetTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppIconSetTests.swift; sourceTree = ""; }; + F757D82D220FC36B0060A62E /* AssetResizerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AssetResizerTests.swift; sourceTree = ""; }; + F757D82E220FC36B0060A62E /* ResizedImageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResizedImageTests.swift; sourceTree = ""; }; + F757D82F220FC36B0060A62E /* LinuxMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LinuxMain.swift; path = Tests/LinuxMain.swift; sourceTree = ""; }; F79678E31EDFD14600AC0948 /* AssetResizer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AssetResizer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F79678E71EDFD14600AC0948 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F79678EC1EDFD14600AC0948 /* AssetResizerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AssetResizerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - F79678F31EDFD14600AC0948 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F79678FF1EDFD6A600AC0948 /* AssetResizerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AssetResizerTests.swift; sourceTree = ""; }; - F7F0E33E1EDFE9D500E09A9A /* NSImage+Resizing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSImage+Resizing.swift"; sourceTree = ""; }; - F7F0E3411EE0011C00E09A9A /* NSImage+Saving.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSImage+Saving.swift"; sourceTree = ""; }; - F7F0E34D1EE0388300E09A9A /* sample-blue-app-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sample-blue-app-icon.png"; sourceTree = ""; }; - F7F0E34E1EE0388300E09A9A /* sample-red-app-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sample-red-app-icon.png"; sourceTree = ""; }; - F7F0E3521EE0390500E09A9A /* Bundle+Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+Tests.swift"; sourceTree = ""; }; - F7F0E3541EE0390E00E09A9A /* TestData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestData.swift; sourceTree = ""; }; - F7F0E3561EE0462800E09A9A /* ResizedImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResizedImage.swift; sourceTree = ""; }; - F7F0E3581EE14C0B00E09A9A /* AppIconSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppIconSet.swift; sourceTree = ""; }; - F7F0E35A1EE153EB00E09A9A /* AppIconSetTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppIconSetTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -77,79 +79,82 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - F79678D91EDFD14600AC0948 = { + F757D816220FC3560060A62E /* AssetResizer */ = { isa = PBXGroup; children = ( - F79678E51EDFD14600AC0948 /* AssetResizer */, - F79678F01EDFD14600AC0948 /* AssetResizerTests */, - F79678E41EDFD14600AC0948 /* Products */, - F70398691EE6D347003F2AD6 /* LICENSE */, - F703986A1EE6D347003F2AD6 /* README.md */, - F703986C1EE6D7A7003F2AD6 /* .travis.yml */, + F757D817220FC3560060A62E /* AppIconSet.swift */, + F757D818220FC3560060A62E /* NSImage+Saving.swift */, + F757D819220FC3560060A62E /* ResizedImage.swift */, + F757D81A220FC3560060A62E /* NSImage+Resizing.swift */, ); + name = AssetResizer; + path = Sources/AssetResizer; sourceTree = ""; }; - F79678E41EDFD14600AC0948 /* Products */ = { + F757D81F220FC36B0060A62E /* AssetResizerTests */ = { isa = PBXGroup; children = ( - F79678E31EDFD14600AC0948 /* AssetResizer.framework */, - F79678EC1EDFD14600AC0948 /* AssetResizerTests.xctest */, + F757D82C220FC36B0060A62E /* AppIconSetTests.swift */, + F757D82D220FC36B0060A62E /* AssetResizerTests.swift */, + F757D82E220FC36B0060A62E /* ResizedImageTests.swift */, + F757D82A220FC36B0060A62E /* SizeDescriptionTests.swift */, + F757D824220FC36B0060A62E /* test-data */, + F757D820220FC36B0060A62E /* Tools */, + F757D82B220FC36B0060A62E /* XCTestManifests.swift */, ); - name = Products; + name = AssetResizerTests; + path = Tests/AssetResizerTests; sourceTree = ""; }; - F79678E51EDFD14600AC0948 /* AssetResizer */ = { + F757D820220FC36B0060A62E /* Tools */ = { isa = PBXGroup; children = ( - F7F0E3581EE14C0B00E09A9A /* AppIconSet.swift */, - F7F0E3561EE0462800E09A9A /* ResizedImage.swift */, - F7F0E33E1EDFE9D500E09A9A /* NSImage+Resizing.swift */, - F7F0E3411EE0011C00E09A9A /* NSImage+Saving.swift */, - F79678E71EDFD14600AC0948 /* Info.plist */, + F757D821220FC36B0060A62E /* URL+TempFolder.swift */, + F757D822220FC36B0060A62E /* TestData.swift */, + F757D823220FC36B0060A62E /* Bundle+Tests.swift */, ); - path = AssetResizer; + path = Tools; sourceTree = ""; }; - F79678F01EDFD14600AC0948 /* AssetResizerTests */ = { + F757D824220FC36B0060A62E /* test-data */ = { isa = PBXGroup; children = ( - F79678FF1EDFD6A600AC0948 /* AssetResizerTests.swift */, - F7F0E35A1EE153EB00E09A9A /* AppIconSetTests.swift */, - F7363ED51EE531DD005BA675 /* ResizedImageTests.swift */, - F7678EF51EE550A60089FAF7 /* SizeDescriptionTests.swift */, - F7F0E3511EE0390500E09A9A /* Tools */, - F7F0E34B1EE0388300E09A9A /* test-data */, - F79678F31EDFD14600AC0948 /* Info.plist */, + F757D825220FC36B0060A62E /* iOS */, + F757D828220FC36B0060A62E /* SampleAppIcon.appiconset.zip */, ); - path = AssetResizerTests; + path = "test-data"; sourceTree = ""; }; - F7F0E34B1EE0388300E09A9A /* test-data */ = { + F757D825220FC36B0060A62E /* iOS */ = { isa = PBXGroup; children = ( - F7678EFA1EE558160089FAF7 /* SampleAppIcon.appiconset.zip */, - F7F0E34C1EE0388300E09A9A /* iOS */, + F757D826220FC36B0060A62E /* sample-red-app-icon.png */, + F757D827220FC36B0060A62E /* sample-blue-app-icon.png */, ); - path = "test-data"; + path = iOS; sourceTree = ""; }; - F7F0E34C1EE0388300E09A9A /* iOS */ = { + F79678D91EDFD14600AC0948 = { isa = PBXGroup; children = ( - F7F0E34D1EE0388300E09A9A /* sample-blue-app-icon.png */, - F7F0E34E1EE0388300E09A9A /* sample-red-app-icon.png */, + F757D816220FC3560060A62E /* AssetResizer */, + F757D81F220FC36B0060A62E /* AssetResizerTests */, + F757D82F220FC36B0060A62E /* LinuxMain.swift */, + F79678E41EDFD14600AC0948 /* Products */, + F70398691EE6D347003F2AD6 /* LICENSE */, + F757D815220FC3490060A62E /* Package.swift */, + F703986A1EE6D347003F2AD6 /* README.md */, + F703986C1EE6D7A7003F2AD6 /* .travis.yml */, ); - path = iOS; sourceTree = ""; }; - F7F0E3511EE0390500E09A9A /* Tools */ = { + F79678E41EDFD14600AC0948 /* Products */ = { isa = PBXGroup; children = ( - F7F0E3521EE0390500E09A9A /* Bundle+Tests.swift */, - F7678EFC1EE5717A0089FAF7 /* URL+TempFolder.swift */, - F7F0E3541EE0390E00E09A9A /* TestData.swift */, + F79678E31EDFD14600AC0948 /* AssetResizer.framework */, + F79678EC1EDFD14600AC0948 /* AssetResizerTests.xctest */, ); - path = Tools; + name = Products; sourceTree = ""; }; /* End PBXGroup section */ @@ -255,9 +260,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - F7F0E3501EE0388300E09A9A /* sample-red-app-icon.png in Resources */, - F7678EFB1EE558160089FAF7 /* SampleAppIcon.appiconset.zip in Resources */, - F7F0E34F1EE0388300E09A9A /* sample-blue-app-icon.png in Resources */, + F757D834220FC36B0060A62E /* sample-blue-app-icon.png in Resources */, + F757D833220FC36B0060A62E /* sample-red-app-icon.png in Resources */, + F757D835220FC36B0060A62E /* SampleAppIcon.appiconset.zip in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -268,10 +273,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F7F0E3591EE14C0B00E09A9A /* AppIconSet.swift in Sources */, - F7F0E3421EE0011C00E09A9A /* NSImage+Saving.swift in Sources */, - F7F0E33F1EDFE9D500E09A9A /* NSImage+Resizing.swift in Sources */, - F7F0E3571EE0462800E09A9A /* ResizedImage.swift in Sources */, + F757D81D220FC3560060A62E /* ResizedImage.swift in Sources */, + F757D81C220FC3560060A62E /* NSImage+Saving.swift in Sources */, + F757D81B220FC3560060A62E /* AppIconSet.swift in Sources */, + F757D81E220FC3560060A62E /* NSImage+Resizing.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -279,13 +284,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F7363ED61EE531DD005BA675 /* ResizedImageTests.swift in Sources */, - F7F0E3531EE0390500E09A9A /* Bundle+Tests.swift in Sources */, - F7F0E35B1EE153EB00E09A9A /* AppIconSetTests.swift in Sources */, - F7678EF61EE550A60089FAF7 /* SizeDescriptionTests.swift in Sources */, - F79679001EDFD6A600AC0948 /* AssetResizerTests.swift in Sources */, - F7F0E3551EE0390E00E09A9A /* TestData.swift in Sources */, - F7678EFD1EE5717A0089FAF7 /* URL+TempFolder.swift in Sources */, + F757D838220FC36B0060A62E /* XCTestManifests.swift in Sources */, + F757D841220FC4560060A62E /* URL+TempFolder.swift in Sources */, + F757D83E220FC4560060A62E /* AssetResizerTests.swift in Sources */, + F757D840220FC4560060A62E /* SizeDescriptionTests.swift in Sources */, + F757D83F220FC4560060A62E /* ResizedImageTests.swift in Sources */, + F757D843220FC4560060A62E /* Bundle+Tests.swift in Sources */, + F757D842220FC4560060A62E /* TestData.swift in Sources */, + F757D83D220FC4560060A62E /* AppIconSetTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -426,7 +432,6 @@ DYLIB_CURRENT_VERSION = 9; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = AssetResizer/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = net.jeanetienne.AssetResizer; @@ -450,7 +455,6 @@ DYLIB_CURRENT_VERSION = 9; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = AssetResizer/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = net.jeanetienne.AssetResizer; @@ -467,7 +471,6 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = N44EJ7YB22; - INFOPLIST_FILE = AssetResizerTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = net.jeanetienne.AssetResizerTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -482,7 +485,6 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = N44EJ7YB22; - INFOPLIST_FILE = AssetResizerTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = net.jeanetienne.AssetResizerTests; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/AssetResizer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/AssetResizer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/AssetResizer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/AssetResizer/Info.plist b/AssetResizer/Info.plist deleted file mode 100644 index 95286f7..0000000 --- a/AssetResizer/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.3.0 - CFBundleVersion - 9 - NSHumanReadableCopyright - Copyright © 2019 Jean-Étienne. All rights reserved. - NSPrincipalClass - - - diff --git a/AssetResizerTests/Info.plist b/AssetResizerTests/Info.plist deleted file mode 100644 index 1b039fd..0000000 --- a/AssetResizerTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 0.3.0 - CFBundleVersion - 9 - - diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..f3e4192 --- /dev/null +++ b/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:4.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "AssetResizer", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "AssetResizer", + targets: ["AssetResizer"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "AssetResizer", + dependencies: []), + .testTarget( + name: "AssetResizerTests", + dependencies: ["AssetResizer"]), + ] +) diff --git a/AssetResizer/AppIconSet.swift b/Sources/AssetResizer/AppIconSet.swift similarity index 100% rename from AssetResizer/AppIconSet.swift rename to Sources/AssetResizer/AppIconSet.swift diff --git a/AssetResizer/NSImage+Resizing.swift b/Sources/AssetResizer/NSImage+Resizing.swift similarity index 100% rename from AssetResizer/NSImage+Resizing.swift rename to Sources/AssetResizer/NSImage+Resizing.swift diff --git a/AssetResizer/NSImage+Saving.swift b/Sources/AssetResizer/NSImage+Saving.swift similarity index 100% rename from AssetResizer/NSImage+Saving.swift rename to Sources/AssetResizer/NSImage+Saving.swift diff --git a/AssetResizer/ResizedImage.swift b/Sources/AssetResizer/ResizedImage.swift similarity index 100% rename from AssetResizer/ResizedImage.swift rename to Sources/AssetResizer/ResizedImage.swift diff --git a/AssetResizerTests/AppIconSetTests.swift b/Tests/AssetResizerTests/AppIconSetTests.swift similarity index 100% rename from AssetResizerTests/AppIconSetTests.swift rename to Tests/AssetResizerTests/AppIconSetTests.swift diff --git a/AssetResizerTests/AssetResizerTests.swift b/Tests/AssetResizerTests/AssetResizerTests.swift similarity index 73% rename from AssetResizerTests/AssetResizerTests.swift rename to Tests/AssetResizerTests/AssetResizerTests.swift index 765fa70..c1980dc 100644 --- a/AssetResizerTests/AssetResizerTests.swift +++ b/Tests/AssetResizerTests/AssetResizerTests.swift @@ -7,6 +7,4 @@ import XCTest @testable import AssetResizer -class AssetResizerTests: XCTestCase { - -} +final class AssetResizerTests: XCTestCase {} diff --git a/AssetResizerTests/ResizedImageTests.swift b/Tests/AssetResizerTests/ResizedImageTests.swift similarity index 100% rename from AssetResizerTests/ResizedImageTests.swift rename to Tests/AssetResizerTests/ResizedImageTests.swift diff --git a/AssetResizerTests/SizeDescriptionTests.swift b/Tests/AssetResizerTests/SizeDescriptionTests.swift similarity index 100% rename from AssetResizerTests/SizeDescriptionTests.swift rename to Tests/AssetResizerTests/SizeDescriptionTests.swift diff --git a/AssetResizerTests/Tools/Bundle+Tests.swift b/Tests/AssetResizerTests/Tools/Bundle+Tests.swift similarity index 100% rename from AssetResizerTests/Tools/Bundle+Tests.swift rename to Tests/AssetResizerTests/Tools/Bundle+Tests.swift diff --git a/AssetResizerTests/Tools/TestData.swift b/Tests/AssetResizerTests/Tools/TestData.swift similarity index 100% rename from AssetResizerTests/Tools/TestData.swift rename to Tests/AssetResizerTests/Tools/TestData.swift diff --git a/AssetResizerTests/Tools/URL+TempFolder.swift b/Tests/AssetResizerTests/Tools/URL+TempFolder.swift similarity index 100% rename from AssetResizerTests/Tools/URL+TempFolder.swift rename to Tests/AssetResizerTests/Tools/URL+TempFolder.swift diff --git a/Tests/AssetResizerTests/XCTestManifests.swift b/Tests/AssetResizerTests/XCTestManifests.swift new file mode 100644 index 0000000..1876974 --- /dev/null +++ b/Tests/AssetResizerTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !os(macOS) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(AssetResizerTests.allTests), + ] +} +#endif \ No newline at end of file diff --git a/AssetResizerTests/test-data/SampleAppIcon.appiconset.zip b/Tests/AssetResizerTests/test-data/SampleAppIcon.appiconset.zip similarity index 100% rename from AssetResizerTests/test-data/SampleAppIcon.appiconset.zip rename to Tests/AssetResizerTests/test-data/SampleAppIcon.appiconset.zip diff --git a/AssetResizerTests/test-data/iOS/sample-blue-app-icon.png b/Tests/AssetResizerTests/test-data/iOS/sample-blue-app-icon.png similarity index 100% rename from AssetResizerTests/test-data/iOS/sample-blue-app-icon.png rename to Tests/AssetResizerTests/test-data/iOS/sample-blue-app-icon.png diff --git a/AssetResizerTests/test-data/iOS/sample-red-app-icon.png b/Tests/AssetResizerTests/test-data/iOS/sample-red-app-icon.png similarity index 100% rename from AssetResizerTests/test-data/iOS/sample-red-app-icon.png rename to Tests/AssetResizerTests/test-data/iOS/sample-red-app-icon.png diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..fbeb908 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import AssetResizerTests + +var tests = [XCTestCaseEntry]() +tests += AssetResizerTests.allTests() +XCTMain(tests) \ No newline at end of file From 0b03c07edb3a491b2c83865e8b9f319f07218c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-E=CC=81tienne?= Date: Sun, 10 Feb 2019 13:33:48 +1100 Subject: [PATCH 2/2] Disabling Swift 3 @objc inference --- AssetResizer.xcodeproj/project.pbxproj | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/AssetResizer.xcodeproj/project.pbxproj b/AssetResizer.xcodeproj/project.pbxproj index 39d6a22..007b494 100644 --- a/AssetResizer.xcodeproj/project.pbxproj +++ b/AssetResizer.xcodeproj/project.pbxproj @@ -438,7 +438,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.2; }; name = Debug; @@ -460,7 +459,6 @@ PRODUCT_BUNDLE_IDENTIFIER = net.jeanetienne.AssetResizer; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.2; }; name = Release; @@ -469,12 +467,13 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = N44EJ7YB22; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = net.jeanetienne.AssetResizerTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.2; }; name = Debug; @@ -483,12 +482,12 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = N44EJ7YB22; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = net.jeanetienne.AssetResizerTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.2; }; name = Release;