|
| 1 | +// swift-tools-version:5.5 |
| 2 | + |
| 3 | +import PackageDescription |
| 4 | + |
| 5 | +let package = Package( |
| 6 | + name: "WordPressShared", |
| 7 | + platforms: [.iOS(.v13)], |
| 8 | + products: [ |
| 9 | + .library(name: "WordPressShared", targets: ["WordPressShared"]) |
| 10 | + ], |
| 11 | + dependencies: [ |
| 12 | + .package(url: "https://github.com/buildkite/test-collector-swift", from: "0.3.0"), |
| 13 | + .package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack", from: "3.8.0"), |
| 14 | + .package(url: "https://github.com/AliSoftware/OHHTTPStubs", from: "9.1.0"), |
| 15 | + // See https://github.com/erikdoe/ocmock/issues/500#issuecomment-1002700625 |
| 16 | + .package(url: "https://github.com/erikdoe/ocmock", revision: "afd2c6924e8a36cb872bc475248b978f743c6050"), |
| 17 | + .package(url: "https://github.com/Quick/Quick", from: "6.0.0"), |
| 18 | + ], |
| 19 | + targets: [ |
| 20 | + .target( |
| 21 | + name: "WordPressSharedAnalyticsObjC", |
| 22 | + path: "WordPressShared/Core/Analytics", |
| 23 | + sources: ["WPAnalytics.m"], |
| 24 | + publicHeadersPath: "." |
| 25 | + ), |
| 26 | + .target( |
| 27 | + name: "WordPressSharedAnalytics", |
| 28 | + dependencies: [.target(name: "WordPressSharedAnalyticsObjC")], |
| 29 | + path: "WordPressShared/Core/Analytics", |
| 30 | + sources: ["AnalyticsEvent.swift"] |
| 31 | + ), |
| 32 | + .target( |
| 33 | + name: "WordPressSharedLoggingObjCPrivate", |
| 34 | + dependencies: [.product(name: "CocoaLumberjack", package: "CocoaLumberjack")], |
| 35 | + path: "WordPressShared/Private", |
| 36 | + sources: ["WPSharedLoggingPrivate.m",], |
| 37 | + publicHeadersPath: "." |
| 38 | + ), |
| 39 | + .target( |
| 40 | + name: "WordPressSharedLoggingObjC", |
| 41 | + dependencies: [.target(name: "WordPressSharedLoggingObjCPrivate")], |
| 42 | + path: "WordPressShared/Core/Logging", |
| 43 | + sources: ["WPSharedLogging.m"], |
| 44 | + publicHeadersPath: "." |
| 45 | + ), |
| 46 | + .target( |
| 47 | + name: "WordPressSharedUtlityObjC", |
| 48 | + dependencies: [ |
| 49 | + .target(name: "WordPressSharedLoggingObjCPrivate"), |
| 50 | + .target(name: "WordPressSharedResources"), |
| 51 | + ], |
| 52 | + path: "WordPressShared/Core/Utility", |
| 53 | + sources: [ |
| 54 | + "PhotonImageURLHelper.m", |
| 55 | + "NSString+Helpers.m", |
| 56 | + "DisplayableImageHelper.m", |
| 57 | + "NSString+XMLExtensions.m", |
| 58 | + "WPFontManager.m", |
| 59 | + "DateUtils.m", |
| 60 | + "WPDeviceIdentification.m", |
| 61 | + "NSString+Util.m", |
| 62 | + "UIDevice+Helpers.m", |
| 63 | + "NSBundle+VersionNumberHelper.m", |
| 64 | + "WPImageSource.m", |
| 65 | + "WPMapFilterReduce.m", |
| 66 | + ], |
| 67 | + publicHeadersPath: "." |
| 68 | + ), |
| 69 | + .target( |
| 70 | + name: "WordPressSharedResources", |
| 71 | + dependencies: [.product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack")], |
| 72 | + path: "WordPressShared", |
| 73 | + sources: [ |
| 74 | + "Core/Utility/NSBundle+WordPressShared.swift", |
| 75 | + ], |
| 76 | + resources: [.process("Resources")] |
| 77 | + ), |
| 78 | + .target( |
| 79 | + name: "WordPressSharedUtlity", |
| 80 | + dependencies: [ |
| 81 | + .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"), |
| 82 | + .target(name: "WordPressSharedUtlityObjC"), |
| 83 | + .target(name: "WordPressSharedResources"), |
| 84 | + ], |
| 85 | + path: "WordPressShared/Core/Utility", |
| 86 | + sources: [ |
| 87 | + "String+StripGutenbergContentForExcerpt.swift", |
| 88 | + "EmailFormatValidator.swift", |
| 89 | + "String+RemovingMatches.swift", |
| 90 | + "EmailTypoChecker.swift", |
| 91 | + "Dictionary+Helpers.swift", |
| 92 | + "Secret.swift", |
| 93 | + "WPImageURLHelper.swift", |
| 94 | + "NSDate+Helpers.swift", |
| 95 | + "CollectionType+Helpers.swift", |
| 96 | + "NSString+Summary.swift", |
| 97 | + "String+StripShortcodes.swift", |
| 98 | + "RichContentFormatter.swift", |
| 99 | + "String+URLValidation.swift", |
| 100 | + "Debouncer.swift", |
| 101 | + "Languages.swift", |
| 102 | + "NSString+Swift.swift", |
| 103 | + "NSMutableData+Helpers.swift", |
| 104 | + "String+Helpers.swift", |
| 105 | + ] |
| 106 | + ), |
| 107 | + .target( |
| 108 | + name: "WordPressSharedViewObjC", |
| 109 | + dependencies: [ |
| 110 | + .target(name: "WordPressSharedUtlityObjC") |
| 111 | + ], |
| 112 | + path: "WordPressShared/Core/Views", |
| 113 | + sources: [ |
| 114 | + "WPStyleGuide.m", |
| 115 | + "WPTextFieldTableViewCell.m", |
| 116 | + "WPTableViewCell.m", |
| 117 | + "WPNUXUtility.m", |
| 118 | + ], |
| 119 | + publicHeadersPath: "." |
| 120 | + ), |
| 121 | + .target( |
| 122 | + name: "WordPressSharedView", |
| 123 | + dependencies: [ |
| 124 | + .target(name: "WordPressSharedViewObjC"), |
| 125 | + ], |
| 126 | + path: "WordPressShared/Core/Views", |
| 127 | + sources: [ |
| 128 | + "WPStyleGuide+SerifFonts.swift", |
| 129 | + "WPStyleGuide+DynamicType.swift", |
| 130 | + ] |
| 131 | + ), |
| 132 | + .target( |
| 133 | + name: "WordPressShared", |
| 134 | + dependencies: [ |
| 135 | + .target(name: "WordPressSharedAnalyticsObjC"), |
| 136 | + .target(name: "WordPressSharedAnalytics"), |
| 137 | + .target(name: "WordPressSharedLoggingObjC"), |
| 138 | + .target(name: "WordPressSharedUtlityObjC"), |
| 139 | + .target(name: "WordPressSharedResources"), |
| 140 | + .target(name: "WordPressSharedUtlity"), |
| 141 | + .target(name: "WordPressSharedViewObjC"), |
| 142 | + .target(name: "WordPressSharedView"), |
| 143 | + ], |
| 144 | + path: "WordPressShared", |
| 145 | + sources: ["WordPressShared.swift"] |
| 146 | + ), |
| 147 | + .testTarget( |
| 148 | + name: "WordPressSharedTests", |
| 149 | + dependencies: [ |
| 150 | + .target(name: "WordPressShared"), |
| 151 | + .product(name: "OCMock", package: "ocmock"), |
| 152 | + "Quick", |
| 153 | + "OHHTTPStubs", |
| 154 | + ], |
| 155 | + path: "WordPressSharedTests", |
| 156 | + sources: [ |
| 157 | + "WPImageSourceTest.m", |
| 158 | + "TestAnalyticsTracker.m", |
| 159 | + "PhotonImageURLHelperTest.m", |
| 160 | + "DisplayableImageHelperTest.m", |
| 161 | + "NSStringHelpersTests.m", |
| 162 | + "WPAnalyticsTests.m", |
| 163 | + "NSStringSwiftTests.m", |
| 164 | + "WPMapFilterReduceTest.m", |
| 165 | + ], |
| 166 | + resources: [ |
| 167 | + .copy("anim-reader.gif"), |
| 168 | + .copy("test-image.jpg"), |
| 169 | + ] |
| 170 | + ) |
| 171 | + ] |
| 172 | +) |
0 commit comments