tristanhimmelman / ObjectMapper

Simple JSON Object mapping written in Swift
MIT License
9.14k stars 1.03k forks source link

Swift 5 and package manager support to be able to SPM AlamofireObjectMapper #1097

Closed kenji21 closed 4 years ago

kenji21 commented 4 years ago

Why

I want to add SPM support for AlamofireObjectMapper (https://github.com/tristanhimmelman/AlamofireObjectMapper/issues/305) So I need to be able to swift build and also swift test Related issues: https://github.com/tristanhimmelman/ObjectMapper/issues/1082 and https://github.com/tristanhimmelman/ObjectMapper/issues/1089

What

Cherry-picked 4 commits from https://github.com/tristanhimmelman/ObjectMapper/pull/1081, thanks to @emrcftci Removed Sources symlink and fixed Package.swift to mark it Swift 5 (otherwise, it is swift 3... and the path to sources can't be customised) Added test target in Package.swift to be able to swift test Found 176 macOS tests while having 174 when runner with the xcworkspace (URLTransformTests were missing to macOS and tvOS test targets)

kenji21 commented 4 years ago

travis doesn't run for PR ?

adding swift build and swift test in travis should be nice to keep SPM running OK

maybe adding linux support in SPM / travis should also be added (as another PR)

tristanhimmelman commented 4 years ago

Hey, I've fixed the Travis integration so it should work now. Can you please merge master as I've merged a PR to upgrade to swift 5

kenji21 commented 4 years ago

Just done it, waiting travis feedback

kenji21 commented 4 years ago

Just updated SPM configuration line in README.md