Skip to content

Instantly share code, notes, and snippets.

@petrpavlik
Created October 28, 2020 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrpavlik/47b94e2e2dee1c9afa474d757624f839 to your computer and use it in GitHub Desktop.
Save petrpavlik/47b94e2e2dee1c9afa474d757624f839 to your computer and use it in GitHub Desktop.
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "BusinessLogic",
platforms: [
.iOS(.v13), .macOS(.v10_15)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "BusinessLogic",
targets: ["BusinessLogic"]),
.library(
name: "BusinessLogicMocks",
targets: ["BusinessLogicMocks"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", from: "6.4.0"),
.package(url: "https://github.com/perrystreetsoftware/tokenbucketratelimiter.git", from: "0.0.15"),
.package(path: "../DomainModels")
],
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: "BusinessLogic",
dependencies: ["ReactiveSwift", "DomainModels"],
swiftSettings: [
.define("DEBUG", .when(configuration: .debug)),
]),
.target(
name: "BusinessLogicMocks",
dependencies: ["BusinessLogic"]),
.testTarget(
name: "BusinessLogicTests",
dependencies: ["BusinessLogicMocks"])
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment