Package.swift 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. // swift-tools-version:5.4
  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. .testTarget(
  73. name: "GzipTests",
  74. dependencies: ["Gzip"],
  75. resources: [.process("Resources")]
  76. ),
  77. .target(
  78. name: "XML",
  79. dependencies: [],
  80. exclude: ["LICENSE"]
  81. ),
  82. .testTarget(
  83. name: "XMLTests",
  84. dependencies: ["XML"],
  85. resources: [.process("Resources")]
  86. ),
  87. // MARK: KeePass Cryptographic Libraries
  88. .target(
  89. name: "Sodium",
  90. dependencies: [],
  91. exclude: ["LICENSE"],
  92. cSettings: [
  93. .headerSearchPath("include/sodium"),
  94. .define("CONFIGURED"),
  95. ]
  96. ),
  97. .target(
  98. name: "Argon2",
  99. dependencies: [],
  100. exclude: ["LICENSE"]
  101. ),
  102. .target(
  103. name: "Twofish",
  104. dependencies: [],
  105. exclude: ["LICENSE"]
  106. ),
  107. ]
  108. )