diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bacf20..0b8e6fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ All notable changes to this project will be documented in this file. `Gloss` adheres to [Semantic Versioning](http://semver.org/). +- `3.0.X` Releases - [3.0.0](#300) | [3.1.0](#310) - `2.1.x` Releases - [2.1.0](#210) | [2.1.1](#211) - `2.0.x` Releases - [2.0.0-beta.1](#200-beta1) | [2.0.0-beta.2](#200-beta2) | [2.0.0](#200) | [2.0.1](#201) - `1.2.x` Releases - [1.2.0](#120) | [1.2.1](#121) | [1.2.2](#122) | [1.2.3](#123) | [1.2.4](#124) @@ -16,6 +17,21 @@ All notable changes to this project will be documented in this file. - `0.2.x` Releases - [0.2.0](#020) - `0.1.x` Releases - [0.1.0](#010) +--- +## [3.1.0](https://github.com/hkellaway/Gloss/releases/tag/3.1.0) +Released on 2019-10-15. + +#### Added +- Official support for Swift Package Manager [[PR #358](https://github.com/hkellaway/Gloss/pull/358)] + +--- + +## [3.0.0](https://github.com/hkellaway/Gloss/releases/tag/3.0.0) +Released on 2019-07-22. + +#### Updated +- Swift 5.0 compatibility [[Issue #350](https://github.com/hkellaway/Gloss/pull/350)] + --- ## [2.1.1](https://github.com/hkellaway/Gloss/releases/tag/2.1.1) diff --git a/Sources/Gloss.h b/Gloss.h similarity index 100% rename from Sources/Gloss.h rename to Gloss.h diff --git a/Gloss.podspec b/Gloss.podspec index 1cbbd0c..05b4ab7 100644 --- a/Gloss.podspec +++ b/Gloss.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Gloss" - s.version = "3.0.0" + s.version = "3.1.0" s.summary = "A shiny JSON parsing library in Swift" s.description = "A shiny JSON parsing library in Swift. Features include mapping JSON to objects, mapping objects to JSON, handling of nested objects and custom transformations." s.homepage = "https://github.com/hkellaway/Gloss" @@ -13,6 +13,6 @@ Pod::Spec.new do |s| s.platforms = { :ios => "8.0", :osx => "10.9", :tvos => "9.0", :watchos => "2.0" } s.requires_arc = true - s.source_files = 'Sources/*.{swift}' + s.source_files = 'Sources/Gloss/*.{swift}' end diff --git a/Gloss.xcodeproj/project.pbxproj b/Gloss.xcodeproj/project.pbxproj index a932265..305f8d4 100644 --- a/Gloss.xcodeproj/project.pbxproj +++ b/Gloss.xcodeproj/project.pbxproj @@ -150,11 +150,44 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 07400D1B2354B248008D701C /* Gloss */ = { + isa = PBXGroup; + children = ( + DC47CAA61FAE56D0006E6F9A /* Decoder.swift */, + DC47CAA71FAE56D0006E6F9A /* Encoder.swift */, + DC47CAA81FAE56D0006E6F9A /* ExtensionArray.swift */, + DC47CAA91FAE56D0006E6F9A /* ExtensionDecodable.swift */, + DC47CAAA1FAE56D0006E6F9A /* ExtensionDictionary.swift */, + DC47CAAC1FAE56D0006E6F9A /* Gloss.swift */, + DC47CAAD1FAE56D0006E6F9A /* Info.plist */, + DC47CAAE1FAE56D0006E6F9A /* Operators.swift */, + ); + path = Gloss; + sourceTree = ""; + }; + 07400D1C2354B261008D701C /* GlossTests */ = { + isa = PBXGroup; + children = ( + DC47CACC1FAE572D006E6F9A /* Fakes */, + DC47CAD41FAE572D006E6F9A /* Test Models */, + DC47CAD01FAE572D006E6F9A /* Info.plist */, + DC47CAC91FAE572D006E6F9A /* Comparators.swift */, + DC47CACF1FAE572D006E6F9A /* GlossTests.swift */, + DC47CAD11FAE572D006E6F9A /* KeyPathTests.swift */, + DC47CAD21FAE572D006E6F9A /* ObjectToJSONFlowTests.swift */, + DC47CAD31FAE572D006E6F9A /* OperatorTests.swift */, + DC47CACA1FAE572D006E6F9A /* DecoderTests.swift */, + DC47CACB1FAE572D006E6F9A /* EncoderTests.swift */, + DC47CACE1FAE572D006E6F9A /* FlowObjectCreationTests.swift */, + ); + path = GlossTests; + sourceTree = ""; + }; DC39BF571B8A7AD200088CE0 = { isa = PBXGroup; children = ( + DC47CAAB1FAE56D0006E6F9A /* Gloss.h */, DC47CAA51FAE56D0006E6F9A /* Sources */, - DC47CAC81FAE572D006E6F9A /* Tests */, DC39BF621B8A7AD200088CE0 /* Products */, ); sourceTree = ""; @@ -174,37 +207,12 @@ DC47CAA51FAE56D0006E6F9A /* Sources */ = { isa = PBXGroup; children = ( - DC47CAA61FAE56D0006E6F9A /* Decoder.swift */, - DC47CAA71FAE56D0006E6F9A /* Encoder.swift */, - DC47CAA81FAE56D0006E6F9A /* ExtensionArray.swift */, - DC47CAA91FAE56D0006E6F9A /* ExtensionDecodable.swift */, - DC47CAAA1FAE56D0006E6F9A /* ExtensionDictionary.swift */, - DC47CAAB1FAE56D0006E6F9A /* Gloss.h */, - DC47CAAC1FAE56D0006E6F9A /* Gloss.swift */, - DC47CAAD1FAE56D0006E6F9A /* Info.plist */, - DC47CAAE1FAE56D0006E6F9A /* Operators.swift */, + 07400D1C2354B261008D701C /* GlossTests */, + 07400D1B2354B248008D701C /* Gloss */, ); path = Sources; sourceTree = ""; }; - DC47CAC81FAE572D006E6F9A /* Tests */ = { - isa = PBXGroup; - children = ( - DC47CAC91FAE572D006E6F9A /* Comparators.swift */, - DC47CACA1FAE572D006E6F9A /* DecoderTests.swift */, - DC47CACB1FAE572D006E6F9A /* EncoderTests.swift */, - DC47CACC1FAE572D006E6F9A /* Fakes */, - DC47CACE1FAE572D006E6F9A /* FlowObjectCreationTests.swift */, - DC47CACF1FAE572D006E6F9A /* GlossTests.swift */, - DC47CAD01FAE572D006E6F9A /* Info.plist */, - DC47CAD11FAE572D006E6F9A /* KeyPathTests.swift */, - DC47CAD21FAE572D006E6F9A /* ObjectToJSONFlowTests.swift */, - DC47CAD31FAE572D006E6F9A /* OperatorTests.swift */, - DC47CAD41FAE572D006E6F9A /* Test Models */, - ); - path = Tests; - sourceTree = ""; - }; DC47CACC1FAE572D006E6F9A /* Fakes */ = { isa = PBXGroup; children = ( @@ -550,7 +558,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = Tests/Info.plist; + INFOPLIST_FILE = Sources/GlossTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.GlossTests; @@ -563,7 +571,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = Tests/Info.plist; + INFOPLIST_FILE = Sources/GlossTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.GlossTests; @@ -583,7 +591,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; + INFOPLIST_FILE = Sources/Gloss/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.Gloss; @@ -607,7 +615,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; + INFOPLIST_FILE = Sources/Gloss/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.Gloss; @@ -742,7 +750,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; + INFOPLIST_FILE = Sources/Gloss/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.Gloss; @@ -763,7 +771,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; + INFOPLIST_FILE = Sources/Gloss/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.Gloss; @@ -783,7 +791,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; + INFOPLIST_FILE = Sources/Gloss/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.Gloss; @@ -805,7 +813,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; + INFOPLIST_FILE = Sources/Gloss/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.Gloss; @@ -830,7 +838,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = Sources/Info.plist; + INFOPLIST_FILE = Sources/Gloss/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; @@ -854,7 +862,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = Sources/Info.plist; + INFOPLIST_FILE = Sources/Gloss/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; diff --git a/Gloss.xcodeproj/xcshareddata/xcschemes/Gloss.xcscheme b/Gloss.xcodeproj/xcshareddata/xcschemes/Gloss.xcscheme index 7e374b6..de9c906 100644 --- a/Gloss.xcodeproj/xcshareddata/xcschemes/Gloss.xcscheme +++ b/Gloss.xcodeproj/xcshareddata/xcschemes/Gloss.xcscheme @@ -27,6 +27,15 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + @@ -39,17 +48,6 @@ - - - - - - - - /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - D19E0ACE63372003AA0ABBD4 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-GlossExample/Pods-GlossExample-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Gloss/Gloss.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Gloss.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GlossExample/Pods-GlossExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/GlossExample/GlossExample/Repo.swift b/GlossExample/GlossExample/Repo.swift index 5ed5c4c..a31ae84 100644 --- a/GlossExample/GlossExample/Repo.swift +++ b/GlossExample/GlossExample/Repo.swift @@ -23,6 +23,7 @@ // THE SOFTWARE. // +import Foundation import Gloss struct Repo: Glossy { diff --git a/GlossExample/GlossExample/RepoOwner.swift b/GlossExample/GlossExample/RepoOwner.swift index 0a0d1c7..6b771ce 100644 --- a/GlossExample/GlossExample/RepoOwner.swift +++ b/GlossExample/GlossExample/RepoOwner.swift @@ -23,6 +23,7 @@ // THE SOFTWARE. // +import Foundation import Gloss struct RepoOwner: Glossy { diff --git a/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.pbxproj b/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a2f15d6 --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.pbxproj @@ -0,0 +1,378 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + DC0974E623561A9E00045AB3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0974E523561A9E00045AB3 /* AppDelegate.swift */; }; + DC0974E823561A9E00045AB3 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0974E723561A9E00045AB3 /* SceneDelegate.swift */; }; + DC0974ED23561A9E00045AB3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC0974EB23561A9E00045AB3 /* Main.storyboard */; }; + DC0974EF23561A9F00045AB3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC0974EE23561A9F00045AB3 /* Assets.xcassets */; }; + DC0974F223561A9F00045AB3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC0974F023561A9F00045AB3 /* LaunchScreen.storyboard */; }; + DC0974FB23561ADD00045AB3 /* Repo.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0974F923561ADD00045AB3 /* Repo.swift */; }; + DC0974FC23561ADD00045AB3 /* RepoOwner.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0974FA23561ADD00045AB3 /* RepoOwner.swift */; }; + DC0974FF23561B0200045AB3 /* Gloss in Frameworks */ = {isa = PBXBuildFile; productRef = DC0974FE23561B0200045AB3 /* Gloss */; }; + DC09750123561B1E00045AB3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC09750023561B1D00045AB3 /* ViewController.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + DC0974E223561A9E00045AB3 /* GlossExampleSPM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GlossExampleSPM.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DC0974E523561A9E00045AB3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + DC0974E723561A9E00045AB3 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + DC0974EC23561A9E00045AB3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + DC0974EE23561A9F00045AB3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + DC0974F123561A9F00045AB3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + DC0974F323561A9F00045AB3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DC0974F923561ADD00045AB3 /* Repo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Repo.swift; path = ../../GlossExample/GlossExample/Repo.swift; sourceTree = ""; }; + DC0974FA23561ADD00045AB3 /* RepoOwner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RepoOwner.swift; path = ../../GlossExample/GlossExample/RepoOwner.swift; sourceTree = ""; }; + DC09750023561B1D00045AB3 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = ../../GlossExample/GlossExample/ViewController.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + DC0974DF23561A9E00045AB3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DC0974FF23561B0200045AB3 /* Gloss in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + DC0974D923561A9E00045AB3 = { + isa = PBXGroup; + children = ( + DC0974E423561A9E00045AB3 /* GlossExampleSPM */, + DC0974E323561A9E00045AB3 /* Products */, + ); + sourceTree = ""; + }; + DC0974E323561A9E00045AB3 /* Products */ = { + isa = PBXGroup; + children = ( + DC0974E223561A9E00045AB3 /* GlossExampleSPM.app */, + ); + name = Products; + sourceTree = ""; + }; + DC0974E423561A9E00045AB3 /* GlossExampleSPM */ = { + isa = PBXGroup; + children = ( + DC0974E523561A9E00045AB3 /* AppDelegate.swift */, + DC0974E723561A9E00045AB3 /* SceneDelegate.swift */, + DC0974F923561ADD00045AB3 /* Repo.swift */, + DC0974FA23561ADD00045AB3 /* RepoOwner.swift */, + DC09750023561B1D00045AB3 /* ViewController.swift */, + DC0974EB23561A9E00045AB3 /* Main.storyboard */, + DC0974EE23561A9F00045AB3 /* Assets.xcassets */, + DC0974F023561A9F00045AB3 /* LaunchScreen.storyboard */, + DC0974F323561A9F00045AB3 /* Info.plist */, + ); + path = GlossExampleSPM; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + DC0974E123561A9E00045AB3 /* GlossExampleSPM */ = { + isa = PBXNativeTarget; + buildConfigurationList = DC0974F623561A9F00045AB3 /* Build configuration list for PBXNativeTarget "GlossExampleSPM" */; + buildPhases = ( + DC0974DE23561A9E00045AB3 /* Sources */, + DC0974DF23561A9E00045AB3 /* Frameworks */, + DC0974E023561A9E00045AB3 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GlossExampleSPM; + packageProductDependencies = ( + DC0974FE23561B0200045AB3 /* Gloss */, + ); + productName = GlossExampleSPM; + productReference = DC0974E223561A9E00045AB3 /* GlossExampleSPM.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + DC0974DA23561A9E00045AB3 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1110; + LastUpgradeCheck = 1110; + ORGANIZATIONNAME = "Harlan Kellaway"; + TargetAttributes = { + DC0974E123561A9E00045AB3 = { + CreatedOnToolsVersion = 11.1; + }; + }; + }; + buildConfigurationList = DC0974DD23561A9E00045AB3 /* Build configuration list for PBXProject "GlossExampleSPM" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = DC0974D923561A9E00045AB3; + packageReferences = ( + DC0974FD23561B0200045AB3 /* XCRemoteSwiftPackageReference "Gloss" */, + ); + productRefGroup = DC0974E323561A9E00045AB3 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + DC0974E123561A9E00045AB3 /* GlossExampleSPM */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + DC0974E023561A9E00045AB3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC0974F223561A9F00045AB3 /* LaunchScreen.storyboard in Resources */, + DC0974EF23561A9F00045AB3 /* Assets.xcassets in Resources */, + DC0974ED23561A9E00045AB3 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + DC0974DE23561A9E00045AB3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DC09750123561B1E00045AB3 /* ViewController.swift in Sources */, + DC0974FC23561ADD00045AB3 /* RepoOwner.swift in Sources */, + DC0974E623561A9E00045AB3 /* AppDelegate.swift in Sources */, + DC0974E823561A9E00045AB3 /* SceneDelegate.swift in Sources */, + DC0974FB23561ADD00045AB3 /* Repo.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + DC0974EB23561A9E00045AB3 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + DC0974EC23561A9E00045AB3 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + DC0974F023561A9F00045AB3 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + DC0974F123561A9F00045AB3 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + DC0974F423561A9F00045AB3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + DC0974F523561A9F00045AB3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + DC0974F723561A9F00045AB3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = GlossExampleSPM/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.GlossExampleSPM; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + DC0974F823561A9F00045AB3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = GlossExampleSPM/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.harlankellaway.GlossExampleSPM; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + DC0974DD23561A9E00045AB3 /* Build configuration list for PBXProject "GlossExampleSPM" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DC0974F423561A9F00045AB3 /* Debug */, + DC0974F523561A9F00045AB3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DC0974F623561A9F00045AB3 /* Build configuration list for PBXNativeTarget "GlossExampleSPM" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DC0974F723561A9F00045AB3 /* Debug */, + DC0974F823561A9F00045AB3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + DC0974FD23561B0200045AB3 /* XCRemoteSwiftPackageReference "Gloss" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/hkellaway/Gloss.git"; + requirement = { + branch = develop; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + DC0974FE23561B0200045AB3 /* Gloss */ = { + isa = XCSwiftPackageProductDependency; + package = DC0974FD23561B0200045AB3 /* XCRemoteSwiftPackageReference "Gloss" */; + productName = Gloss; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = DC0974DA23561A9E00045AB3 /* Project object */; +} diff --git a/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..752be0c --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "Gloss", + "repositoryURL": "https://github.com/hkellaway/Gloss.git", + "state": { + "branch": "develop", + "revision": "346902f31ef8ac2828bb2c02bdb35fc8bc7734c9", + "version": null + } + } + ] + }, + "version": 1 +} diff --git a/GlossExampleSPM/GlossExampleSPM/AppDelegate.swift b/GlossExampleSPM/GlossExampleSPM/AppDelegate.swift new file mode 100644 index 0000000..708b83e --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM/AppDelegate.swift @@ -0,0 +1,37 @@ +// +// AppDelegate.swift +// GlossExampleSPM +// +// Created by Harlan Kellaway on 10/15/19. +// Copyright © 2019 Harlan Kellaway. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/GlossExampleSPM/GlossExampleSPM/Assets.xcassets/AppIcon.appiconset/Contents.json b/GlossExampleSPM/GlossExampleSPM/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GlossExampleSPM/GlossExampleSPM/Assets.xcassets/Contents.json b/GlossExampleSPM/GlossExampleSPM/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GlossExampleSPM/GlossExampleSPM/Base.lproj/LaunchScreen.storyboard b/GlossExampleSPM/GlossExampleSPM/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GlossExampleSPM/GlossExampleSPM/Base.lproj/Main.storyboard b/GlossExampleSPM/GlossExampleSPM/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GlossExampleSPM/GlossExampleSPM/Info.plist b/GlossExampleSPM/GlossExampleSPM/Info.plist new file mode 100644 index 0000000..2a3483c --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/GlossExampleSPM/GlossExampleSPM/SceneDelegate.swift b/GlossExampleSPM/GlossExampleSPM/SceneDelegate.swift new file mode 100644 index 0000000..3f39cfc --- /dev/null +++ b/GlossExampleSPM/GlossExampleSPM/SceneDelegate.swift @@ -0,0 +1,53 @@ +// +// SceneDelegate.swift +// GlossExampleSPM +// +// Created by Harlan Kellaway on 10/15/19. +// Copyright © 2019 Harlan Kellaway. All rights reserved. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/Package.swift b/Package.swift index ac10394..54e5add 100644 --- a/Package.swift +++ b/Package.swift @@ -1,30 +1,28 @@ -// -// Package.swift -// Gloss -// -// Copyright (c) 2015 Harlan Kellaway -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// +// swift-tools-version:5.1 +// The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( - name: "Gloss" + name: "Gloss", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "Gloss", + targets: ["Gloss"]), + ], + 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: "Gloss", + dependencies: []), + .testTarget( + name: "GlossTests", + dependencies: ["Gloss"]), + ] ) diff --git a/README.md b/README.md index 5c2e1f0..c158fa4 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,18 @@ ## Getting Started -- [Download Gloss](https://github.com/hkellaway/Gloss/archive/master.zip) and do a `pod install` on the included `GlossExample` app to see Gloss in action -- Check out the [documentation](http://cocoadocs.org/docsets/Gloss/) for a more comprehensive look at the classes available in Gloss +The Gloss source currently available via CocoaPods, Carthage and Swift Package Manager. Example projects are included in this repository of integration (via CocoaPods and SPM) and sample implementation. ### Swift Version -The Gloss source currently available via CocoaPods and Carthage is compatible with Swift 5.0. +It is compatible with Swift 5.0. To use a version compatible with Swift 4.2, use version 2.1.x. ### Installation with CocoaPods ```ruby -pod 'Gloss', '~> 3.0' +pod 'Gloss', '~> 3.1' ``` ### Installation with Carthage @@ -38,16 +37,7 @@ github "hkellaway/Gloss" ### Installation with Swift Package Manager -``` swift -import PackageDescription - -let package = Package( - name: "HelloWorld", - dependencies: [ - .Package(url: "https://github.com/hkellaway/Gloss.git", majorVersion: 3, minor: 0) - ] -) -``` +See [Adding Package Dependencies to Your App](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app). Search for `Gloss` with **Owner** `hkellaway`. Point to the desired version or `master` branch. ## Usage diff --git a/Sources/Decoder.swift b/Sources/Gloss/Decoder.swift similarity index 100% rename from Sources/Decoder.swift rename to Sources/Gloss/Decoder.swift diff --git a/Sources/Encoder.swift b/Sources/Gloss/Encoder.swift similarity index 100% rename from Sources/Encoder.swift rename to Sources/Gloss/Encoder.swift diff --git a/Sources/ExtensionArray.swift b/Sources/Gloss/ExtensionArray.swift similarity index 100% rename from Sources/ExtensionArray.swift rename to Sources/Gloss/ExtensionArray.swift diff --git a/Sources/ExtensionDecodable.swift b/Sources/Gloss/ExtensionDecodable.swift similarity index 100% rename from Sources/ExtensionDecodable.swift rename to Sources/Gloss/ExtensionDecodable.swift diff --git a/Sources/ExtensionDictionary.swift b/Sources/Gloss/ExtensionDictionary.swift similarity index 100% rename from Sources/ExtensionDictionary.swift rename to Sources/Gloss/ExtensionDictionary.swift diff --git a/Sources/Gloss.swift b/Sources/Gloss/Gloss.swift similarity index 100% rename from Sources/Gloss.swift rename to Sources/Gloss/Gloss.swift diff --git a/Sources/Info.plist b/Sources/Gloss/Info.plist similarity index 100% rename from Sources/Info.plist rename to Sources/Gloss/Info.plist diff --git a/Sources/Operators.swift b/Sources/Gloss/Operators.swift similarity index 100% rename from Sources/Operators.swift rename to Sources/Gloss/Operators.swift diff --git a/Tests/Comparators.swift b/Sources/GlossTests/Comparators.swift similarity index 100% rename from Tests/Comparators.swift rename to Sources/GlossTests/Comparators.swift diff --git a/Tests/DecoderTests.swift b/Sources/GlossTests/DecoderTests.swift similarity index 100% rename from Tests/DecoderTests.swift rename to Sources/GlossTests/DecoderTests.swift diff --git a/Tests/EncoderTests.swift b/Sources/GlossTests/EncoderTests.swift similarity index 100% rename from Tests/EncoderTests.swift rename to Sources/GlossTests/EncoderTests.swift diff --git a/Tests/Fakes/FakeLogger.swift b/Sources/GlossTests/Fakes/FakeLogger.swift similarity index 100% rename from Tests/Fakes/FakeLogger.swift rename to Sources/GlossTests/Fakes/FakeLogger.swift diff --git a/Tests/FlowObjectCreationTests.swift b/Sources/GlossTests/FlowObjectCreationTests.swift similarity index 100% rename from Tests/FlowObjectCreationTests.swift rename to Sources/GlossTests/FlowObjectCreationTests.swift diff --git a/Tests/GlossTests.swift b/Sources/GlossTests/GlossTests.swift similarity index 100% rename from Tests/GlossTests.swift rename to Sources/GlossTests/GlossTests.swift diff --git a/Tests/Info.plist b/Sources/GlossTests/Info.plist similarity index 100% rename from Tests/Info.plist rename to Sources/GlossTests/Info.plist diff --git a/Tests/KeyPathTests.swift b/Sources/GlossTests/KeyPathTests.swift similarity index 100% rename from Tests/KeyPathTests.swift rename to Sources/GlossTests/KeyPathTests.swift diff --git a/Tests/ObjectToJSONFlowTests.swift b/Sources/GlossTests/ObjectToJSONFlowTests.swift similarity index 100% rename from Tests/ObjectToJSONFlowTests.swift rename to Sources/GlossTests/ObjectToJSONFlowTests.swift diff --git a/Tests/OperatorTests.swift b/Sources/GlossTests/OperatorTests.swift similarity index 100% rename from Tests/OperatorTests.swift rename to Sources/GlossTests/OperatorTests.swift diff --git a/Tests/Test Models/TestFailableModel.swift b/Sources/GlossTests/Test Models/TestFailableModel.swift similarity index 100% rename from Tests/Test Models/TestFailableModel.swift rename to Sources/GlossTests/Test Models/TestFailableModel.swift diff --git a/Tests/Test Models/TestFailableModelInvalid.json b/Sources/GlossTests/Test Models/TestFailableModelInvalid.json similarity index 100% rename from Tests/Test Models/TestFailableModelInvalid.json rename to Sources/GlossTests/Test Models/TestFailableModelInvalid.json diff --git a/Tests/Test Models/TestFailableModelValid.json b/Sources/GlossTests/Test Models/TestFailableModelValid.json similarity index 100% rename from Tests/Test Models/TestFailableModelValid.json rename to Sources/GlossTests/Test Models/TestFailableModelValid.json diff --git a/Tests/Test Models/TestKeyPathModel.swift b/Sources/GlossTests/Test Models/TestKeyPathModel.swift similarity index 100% rename from Tests/Test Models/TestKeyPathModel.swift rename to Sources/GlossTests/Test Models/TestKeyPathModel.swift diff --git a/Tests/Test Models/TestKeyPathModelCustomDelimiter.swift b/Sources/GlossTests/Test Models/TestKeyPathModelCustomDelimiter.swift similarity index 100% rename from Tests/Test Models/TestKeyPathModelCustomDelimiter.swift rename to Sources/GlossTests/Test Models/TestKeyPathModelCustomDelimiter.swift diff --git a/Tests/Test Models/TestModel.json b/Sources/GlossTests/Test Models/TestModel.json similarity index 100% rename from Tests/Test Models/TestModel.json rename to Sources/GlossTests/Test Models/TestModel.json diff --git a/Tests/Test Models/TestModel.swift b/Sources/GlossTests/Test Models/TestModel.swift similarity index 100% rename from Tests/Test Models/TestModel.swift rename to Sources/GlossTests/Test Models/TestModel.swift diff --git a/Tests/Test Models/TestNestedKeyPathModel.swift b/Sources/GlossTests/Test Models/TestNestedKeyPathModel.swift similarity index 100% rename from Tests/Test Models/TestNestedKeyPathModel.swift rename to Sources/GlossTests/Test Models/TestNestedKeyPathModel.swift diff --git a/Tests/Test Models/TestNestedModel.swift b/Sources/GlossTests/Test Models/TestNestedModel.swift similarity index 100% rename from Tests/Test Models/TestNestedModel.swift rename to Sources/GlossTests/Test Models/TestNestedModel.swift diff --git a/Tests/Test Models/TestUnknownTypeModel.json b/Sources/GlossTests/Test Models/TestUnknownTypeModel.json similarity index 100% rename from Tests/Test Models/TestUnknownTypeModel.json rename to Sources/GlossTests/Test Models/TestUnknownTypeModel.json diff --git a/Tests/Test Models/TestUnknownTypeModel.swift b/Sources/GlossTests/Test Models/TestUnknownTypeModel.swift similarity index 100% rename from Tests/Test Models/TestUnknownTypeModel.swift rename to Sources/GlossTests/Test Models/TestUnknownTypeModel.swift