Skip to content

Commit

Permalink
SPM support
Browse files Browse the repository at this point in the history
  • Loading branch information
kenji21 committed May 13, 2020
1 parent ed1958f commit a657b14
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

let package = Package(
name: "AlamofireObjectMapper",
platforms: [
.iOS(.v10),
.tvOS(.v10),
.watchOS(.v3),
.macOS(.v10_12),
],
products: [
.library(
name: "AlamofireObjectMapper",
targets: ["AlamofireObjectMapper"]
)
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.1.0")),
//.package(url: "https://github.com/tristanhimmelman/ObjectMapper.git", .upToNextMajor(from: "3.5.1")),
.package(url: "https://github.com/openium/ObjectMapper.git", .branch("master")),
],
targets: [
.target(
name: "AlamofireObjectMapper",
dependencies: ["Alamofire", "ObjectMapper"],
path: "AlamofireObjectMapper"
),
.testTarget(
name: "AlamofireObjectMapperTest",
dependencies: ["AlamofireObjectMapper"],
path: "AlamofireObjectMapperTests"
)

],
swiftLanguageVersions: [.v5]
)

5 comments on commit a657b14

@devuzan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi kenji21
I think you should create a version with SPM support. 6.0.0 is not supported SPM.

@kenji21
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, what should be at version 6.0.0 ?

@kenji21
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, you want me to create a 6.1.0 tag in this fork ?

@devuzan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, thanks.

@kenji21
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, I prefer not to, as it points to:

 .package(url: "https://github.com/openium/ObjectMapper.git", .branch("master")),

but you could specify this commit like this in your Package.swift:

.package(url: "https://github.com/openium/AlamofireObjectMapper", .revision("a657b14605d43ae62b35be976806da94ecb28533")),

For reference: https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescription.md

Please sign in to comment.