diff --git a/Package.swift b/Package.swift index eaf1044d..31c09049 100644 --- a/Package.swift +++ b/Package.swift @@ -20,15 +20,31 @@ let package = Package( .library( name: "RollbarDeploys", targets: ["RollbarDeploys"]), - // .library( - // name: "RollbarNotifier", - // targets: ["RollbarNotifier"]), + .library( + name: "RollbarNotifier", + targets: ["RollbarNotifier"]), + .library( + name: "RollbarKSCrash", + targets: ["RollbarKSCrash"]), + .library( + name: "RollbarPLCrashReporter", + targets: ["RollbarPLCrashReporter"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + .package(name:"RollbarCommon", + path: "RollbarCommon" + ), + .package(name:"KSCrash", + url: "https://github.com/kstenerud/KSCrash.git", + Package.Dependency.Requirement.branch("master") + ), + .package(name:"PLCrashReporter", + url: "https://github.com/microsoft/plcrashreporter.git", + Package.Dependency.Requirement.branch("master") + ), ], -// dependencies: [ -// // Dependencies declare other packages that this package depends on. -// // .package(url: /* package url */, from: "1.0.0"), -// .package(path: "RollbarCommon"), -// ], 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. @@ -43,22 +59,22 @@ let package = Package( .headerSearchPath("RollbarCommon/Sources/RollbarCommon/**"), ] ), - .testTarget( - name: "RollbarCommonTests", - dependencies: ["RollbarCommon"], - path: "RollbarCommon/Tests/RollbarCommonTests", - cSettings: [ - .headerSearchPath("RollbarCommon/Tests/RollbarCommonTests/**"), - ] - ), - .testTarget( - name: "RollbarCommonTests-ObjC", - dependencies: ["RollbarCommon"], - path: "RollbarCommon/Tests/RollbarCommonTests-ObjC", - cSettings: [ - .headerSearchPath("RollbarCommon/Tests/RollbarCommonTests-ObjC/**"), - ] - ), +// .testTarget( +// name: "RollbarCommonTests", +// dependencies: ["RollbarCommon"], +// path: "RollbarCommon/Tests/RollbarCommonTests", +// cSettings: [ +// .headerSearchPath("RollbarCommon/Tests/RollbarCommonTests/**"), +// ] +// ), +// .testTarget( +// name: "RollbarCommonTests-ObjC", +// dependencies: ["RollbarCommon"], +// path: "RollbarCommon/Tests/RollbarCommonTests-ObjC", +// cSettings: [ +// .headerSearchPath("RollbarCommon/Tests/RollbarCommonTests-ObjC/**"), +// ] +// ), .target( name: "RollbarDeploys", @@ -69,50 +85,68 @@ let package = Package( .headerSearchPath("RollbarDeploys/Sources/RollbarDeploys/**"), ] ), - .testTarget( - name: "RollbarDeploysTests", - dependencies: ["RollbarDeploys"], - path: "RollbarDeploys/Tests/RollbarDeploysTests", +// .testTarget( +// name: "RollbarDeploysTests", +// dependencies: ["RollbarDeploys"], +// path: "RollbarDeploys/Tests/RollbarDeploysTests", +// cSettings: [ +// .headerSearchPath("RollbarDeploys/Tests/RollbarDeploysTests/**"), +// ] +// ), +// .testTarget( +// name: "RollbarDeploysTests-ObjC", +// dependencies: ["RollbarDeploys"], +// path: "RollbarDeploys/Tests/RollbarDeploysTests-ObjC", +// cSettings: [ +// .headerSearchPath("RollbarDeploys/Tests/RollbarDeploysTests-ObjC/**"), +// ] +// ), + + + .target( + name: "RollbarNotifier", + dependencies: ["RollbarCommon",], + path: "RollbarNotifier/Sources/RollbarNotifier", + publicHeadersPath: "include", + cSettings: [ + .headerSearchPath("RollbarNotifier/Sources/RollbarNotifier/**"), + ] + ), +// .testTarget( +// name: "RollbarNotifierTests", +// dependencies: ["RollbarNotifier"], +// path: "RollbarNotifier/Sources/RollbarNotifierTests", +// cSettings: [ +// .headerSearchPath("RollbarNotifier/Tests/RollbarNotifierTests/**"), +// ] +// ), +// .testTarget( +// name: "RollbarNotifierTests-ObjC", +// dependencies: ["RollbarNotifier"], +// path: "RollbarNotifier/Sources/RollbarNotifierTests-ObjC", +// cSettings: [ +// .headerSearchPath("RollbarNotifier/Tests/RollbarNotifierTests-ObjC/**"), +// ] +// ), + + .target( + name: "RollbarKSCrash", + dependencies: ["RollbarCommon", "KSCrash"], + publicHeadersPath: "include", cSettings: [ - .headerSearchPath("RollbarDeploys/Tests/RollbarDeploysTests/**"), + .headerSearchPath("RollbarKSCrash/Sources/RollbarKSCrash/**"), ] ), - .testTarget( - name: "RollbarDeploysTests-ObjC", - dependencies: ["RollbarDeploys"], - path: "RollbarDeploys/Tests/RollbarDeploysTests-ObjC", + + .target( + name: "RollbarPLCrashReporter", + dependencies: ["RollbarCommon", .product(name: "CrashReporter", package: "PLCrashReporter")], + publicHeadersPath: "include", cSettings: [ - .headerSearchPath("RollbarDeploys/Tests/RollbarDeploysTests-ObjC/**"), + .headerSearchPath("RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/**"), ] ), - - // .target( - // name: "RollbarNotifier", - // dependencies: ["RollbarCommon",], - // path: "RollbarNotifier/Sources/RollbarNotifier", - // publicHeadersPath: "include", - // cSettings: [ - // .headerSearchPath("RollbarNotifier/Sources/RollbarNotifier/**"), - // ] - // ), - // .testTarget( - // name: "RollbarNotifierTests", - // dependencies: ["RollbarNotifier"], - // path: "RollbarNotifier/Sources/RollbarNotifierTests", - // cSettings: [ - // .headerSearchPath("RollbarNotifier/Tests/RollbarNotifierTests/**"), - // ] - // ), - // .testTarget( - // name: "RollbarNotifierTests-ObjC", - // dependencies: ["RollbarNotifier"], - // path: "RollbarNotifier/Sources/RollbarNotifierTests-ObjC", - // cSettings: [ - // .headerSearchPath("RollbarNotifier/Tests/RollbarNotifierTests-ObjC/**"), - // ] - // ), - ], swiftLanguageVersions: [ SwiftVersion.v4,