Package.swift 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. // swift-tools-version:5.3
  2. // The swift-tools-version declares the minimum version of Swift required to build this package.
  3. import PackageDescription
  4. let package = Package(
  5. name: "KeePass",
  6. platforms: [.iOS(.v13), .macOS(.v10_15)],
  7. products: [
  8. // The `Binary` manipulate bytes with ease.
  9. .library(
  10. name: "Binary",
  11. targets: ["Binary"]
  12. ),
  13. // `Crypto` defines cryptographic interfaces used by KeePass.
  14. .library(
  15. name: "Crypto",
  16. targets: ["Crypto"]
  17. ),
  18. // `KeePass` library defines interfaces to work with KeePass files.
  19. .library(
  20. name: "KeePass",
  21. targets: ["KeePass"]
  22. ),
  23. ],
  24. targets: [
  25. .target(
  26. name: "KeePass",
  27. dependencies: ["Binary",
  28. "KDB",
  29. "KDBX"]
  30. ),
  31. .testTarget(
  32. name: "KeePassTests",
  33. dependencies: ["KeePass"],
  34. resources: [.process("Fixtures")]
  35. ),
  36. .target(
  37. name: "KDB",
  38. dependencies: ["Binary",
  39. "Crypto"]
  40. ),
  41. .target(
  42. name: "KDBX",
  43. dependencies: ["Binary",
  44. "Crypto",
  45. "Gzip",
  46. "XML"]
  47. ),
  48. .target(
  49. name: "Binary",
  50. dependencies: []
  51. ),
  52. .testTarget(
  53. name: "BinaryTests",
  54. dependencies: ["Binary"]
  55. ),
  56. .target(
  57. name: "Crypto",
  58. dependencies: ["Binary",
  59. "Sodium",
  60. "Argon2",
  61. "Twofish"]
  62. ),
  63. .testTarget(
  64. name: "CryptoTests",
  65. dependencies: ["Crypto"]
  66. ),
  67. .target(
  68. name: "Gzip",
  69. dependencies: ["Binary"],
  70. exclude: ["LICENSE"]
  71. ),
  72. .target(
  73. name: "XML",
  74. dependencies: [],
  75. exclude: ["LICENSE"]
  76. ),
  77. .testTarget(
  78. name: "XMLTests",
  79. dependencies: ["XML"],
  80. resources: [.process("Resources")]
  81. ),
  82. // MARK: KeePass Cryptographic Libraries
  83. .target(
  84. name: "Sodium",
  85. dependencies: [],
  86. exclude: ["LICENSE"],
  87. cSettings: [
  88. .headerSearchPath("include/sodium"),
  89. .define("CONFIGURED"),
  90. ]
  91. ),
  92. .target(
  93. name: "Argon2",
  94. dependencies: [],
  95. exclude: ["LICENSE"]
  96. ),
  97. .target(
  98. name: "Twofish",
  99. dependencies: []
  100. ),
  101. ]
  102. )