Skip to content

Commit 93a3f1d

Browse files
author
Shinichiro Oba
committed
Support Swift Package Manager
1 parent 82e32fc commit 93a3f1d

File tree

9 files changed

+55
-15
lines changed

9 files changed

+55
-15
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ DerivedData
3131
# Carthage/Checkouts
3232

3333
Carthage/Build
34+
35+
# Swift Package Manager
36+
37+
.build

JSONRPCKit.xcodeproj/project.pbxproj

+14-13
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
7FC654F61D48B6CB004C390C /* Batch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Batch.swift; sourceTree = "<group>"; };
4141
7FC654F71D48B6CB004C390C /* BatchElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BatchElement.swift; sourceTree = "<group>"; };
4242
7FC654FA1D49DF27004C390C /* BatchFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BatchFactory.swift; sourceTree = "<group>"; };
43-
7FC655001D49EA19004C390C /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
43+
7FC655001D49EA19004C390C /* JSONRPCKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JSONRPCKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4444
7FC655041D49EA19004C390C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4545
7FC6550B1D49FA20004C390C /* TestRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestRequest.swift; sourceTree = "<group>"; };
4646
CB31EFB91CF6E8FE00DD13DD /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -75,15 +75,16 @@
7575
/* End PBXFrameworksBuildPhase section */
7676

7777
/* Begin PBXGroup section */
78-
7FC655011D49EA19004C390C /* Tests */ = {
78+
7FC655011D49EA19004C390C /* JSONRPCKitTests */ = {
7979
isa = PBXGroup;
8080
children = (
8181
7FC6550B1D49FA20004C390C /* TestRequest.swift */,
8282
7F359B751D4B1A1100032E8D /* BatchElementTests.swift */,
8383
7F359B771D4B1B0500032E8D /* BatchFactoryTests.swift */,
8484
7FC655041D49EA19004C390C /* Info.plist */,
8585
);
86-
path = Tests;
86+
name = JSONRPCKitTests;
87+
path = Tests/JSONRPCKitTests;
8788
sourceTree = "<group>";
8889
};
8990
CB63E2391CE22F7E00E22B5C /* Frameworks */ = {
@@ -98,7 +99,7 @@
9899
isa = PBXGroup;
99100
children = (
100101
CBB0C3501BF0B1D6006A7D41 /* JSONRPCKit */,
101-
7FC655011D49EA19004C390C /* Tests */,
102+
7FC655011D49EA19004C390C /* JSONRPCKitTests */,
102103
CBB0C34F1BF0B1D6006A7D41 /* Products */,
103104
CB63E2391CE22F7E00E22B5C /* Frameworks */,
104105
);
@@ -108,7 +109,7 @@
108109
isa = PBXGroup;
109110
children = (
110111
CBB0C34E1BF0B1D6006A7D41 /* JSONRPCKit.framework */,
111-
7FC655001D49EA19004C390C /* Tests.xctest */,
112+
7FC655001D49EA19004C390C /* JSONRPCKitTests.xctest */,
112113
);
113114
name = Products;
114115
sourceTree = "<group>";
@@ -144,9 +145,9 @@
144145
/* End PBXHeadersBuildPhase section */
145146

146147
/* Begin PBXNativeTarget section */
147-
7FC654FF1D49EA19004C390C /* Tests */ = {
148+
7FC654FF1D49EA19004C390C /* JSONRPCKitTests */ = {
148149
isa = PBXNativeTarget;
149-
buildConfigurationList = 7FC655081D49EA19004C390C /* Build configuration list for PBXNativeTarget "Tests" */;
150+
buildConfigurationList = 7FC655081D49EA19004C390C /* Build configuration list for PBXNativeTarget "JSONRPCKitTests" */;
150151
buildPhases = (
151152
7FC654FC1D49EA19004C390C /* Sources */,
152153
7FC654FD1D49EA19004C390C /* Frameworks */,
@@ -157,9 +158,9 @@
157158
dependencies = (
158159
7FC655071D49EA19004C390C /* PBXTargetDependency */,
159160
);
160-
name = Tests;
161+
name = JSONRPCKitTests;
161162
productName = Tests;
162-
productReference = 7FC655001D49EA19004C390C /* Tests.xctest */;
163+
productReference = 7FC655001D49EA19004C390C /* JSONRPCKitTests.xctest */;
163164
productType = "com.apple.product-type.bundle.unit-test";
164165
};
165166
CBB0C34D1BF0B1D6006A7D41 /* JSONRPCKit */ = {
@@ -214,7 +215,7 @@
214215
projectRoot = "";
215216
targets = (
216217
CBB0C34D1BF0B1D6006A7D41 /* JSONRPCKit */,
217-
7FC654FF1D49EA19004C390C /* Tests */,
218+
7FC654FF1D49EA19004C390C /* JSONRPCKitTests */,
218219
);
219220
};
220221
/* End PBXProject section */
@@ -277,7 +278,7 @@
277278
isa = XCBuildConfiguration;
278279
buildSettings = {
279280
CLANG_ANALYZER_NONNULL = YES;
280-
INFOPLIST_FILE = Tests/Info.plist;
281+
INFOPLIST_FILE = Tests/JSONRPCKitTests/Info.plist;
281282
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
282283
PRODUCT_BUNDLE_IDENTIFIER = "-.Tests";
283284
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -289,7 +290,7 @@
289290
isa = XCBuildConfiguration;
290291
buildSettings = {
291292
CLANG_ANALYZER_NONNULL = YES;
292-
INFOPLIST_FILE = Tests/Info.plist;
293+
INFOPLIST_FILE = Tests/JSONRPCKitTests/Info.plist;
293294
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
294295
PRODUCT_BUNDLE_IDENTIFIER = "-.Tests";
295296
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -455,7 +456,7 @@
455456
/* End XCBuildConfiguration section */
456457

457458
/* Begin XCConfigurationList section */
458-
7FC655081D49EA19004C390C /* Build configuration list for PBXNativeTarget "Tests" */ = {
459+
7FC655081D49EA19004C390C /* Build configuration list for PBXNativeTarget "JSONRPCKitTests" */ = {
459460
isa = XCConfigurationList;
460461
buildConfigurations = (
461462
7FC655091D49EA19004C390C /* Debug */,

JSONRPCKit.xcodeproj/xcshareddata/xcschemes/JSONRPCKit.xcscheme

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
<BuildableReference
3535
BuildableIdentifier = "primary"
3636
BlueprintIdentifier = "7FC654FF1D49EA19004C390C"
37-
BuildableName = "Tests.xctest"
38-
BlueprintName = "Tests"
37+
BuildableName = "JSONRPCKitTests.xctest"
38+
BlueprintName = "JSONRPCKitTests"
3939
ReferencedContainer = "container:JSONRPCKit.xcodeproj">
4040
</BuildableReference>
4141
</TestableReference>

Package.resolved

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "Result",
6+
"repositoryURL": "https://github.com/antitypical/Result.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "7477584259bfce2560a19e06ad9f71db441fff11",
10+
"version": "3.2.4"
11+
}
12+
}
13+
]
14+
},
15+
"version": 1
16+
}

Package.swift

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// swift-tools-version:4.0
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "JSONRPCKit",
8+
products: [
9+
.library(name: "JSONRPCKit", targets: ["JSONRPCKit"]),
10+
],
11+
dependencies: [
12+
.package(url: "https://github.com/antitypical/Result.git", from: "3.2.0"),
13+
],
14+
targets: [
15+
.target(name: "JSONRPCKit", dependencies: ["Result"], path: "JSONRPCKit"),
16+
.testTarget(name: "JSONRPCKitTests", dependencies: ["JSONRPCKit"]),
17+
],
18+
swiftLanguageVersions: [4]
19+
)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)