Package.swift 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // swift-tools-version: 5.7
  2. // The swift tools-version declares the minimum version of Swift required to build this package.
  3. // *************** Not complete yet, do not expect this to work! ***********************
  4. // There are issues with how test fixtures are copied into the bundle, and then referenced,
  5. // and other issues, largely around accessing bundle resources, and probably others not yet
  6. // discovered, as this is not being used as a swift package from any actual project yet.
  7. import PackageDescription
  8. let package = Package(
  9. name: "LoopKit",
  10. defaultLocalization: "en",
  11. platforms: [.iOS("15.0")],
  12. products: [
  13. // Products define the executables and libraries a package produces, and make them visible to other packages.
  14. .library(
  15. name: "LoopKit",
  16. targets: ["LoopKit"]),
  17. .library(
  18. name: "LoopKitUI",
  19. targets: ["LoopKitUI"]),
  20. ],
  21. dependencies: [
  22. .package(
  23. url: "https://github.com/ivanschuetz/SwiftCharts",
  24. branch: "master"
  25. )
  26. // Dependencies declare other packages that this package depends on.
  27. // .package(url: /* package url */, from: "1.0.0"),
  28. ],
  29. targets: [
  30. // Targets are the basic building blocks of a package. A target can define a module or a test suite.
  31. // Targets can depend on other targets in this package, and on products in packages this package depends on.
  32. .target(
  33. name: "LoopKit",
  34. dependencies: [],
  35. path: "LoopKit"),
  36. .testTarget(
  37. name: "LoopKitTests",
  38. dependencies: ["LoopKit"],
  39. path: "LoopKitTests",
  40. resources: [
  41. .copy("Fixtures")
  42. ]),
  43. .target(
  44. name: "LoopKitUI",
  45. dependencies: ["LoopKit", "SwiftCharts"],
  46. path: "LoopKitUI"),
  47. .target(
  48. name: "LoopTestingKit",
  49. dependencies: ["LoopKit"],
  50. path: "LoopTestingKit"),
  51. .target(
  52. name: "MockKit",
  53. dependencies: ["LoopKit", "LoopKitUI", "LoopTestingKit"],
  54. path: "MockKit"),
  55. .target(
  56. name: "MockKitUI",
  57. dependencies: ["MockKit", "LoopKit", "LoopKitUI"],
  58. path: "MockKitUI"),
  59. ]
  60. )