Skip to content

Commit de3ae5a

Browse files
authored
Creates empty package
Create.package
2 parents f08b370 + 3ed3d3b commit de3ae5a

File tree

10 files changed

+108
-4
lines changed

10 files changed

+108
-4
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
# Xcode
23
#
34
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
@@ -37,10 +38,10 @@ playground.xcworkspace
3738
# Swift Package Manager
3839
#
3940
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40-
# Packages/
41-
# Package.pins
41+
Packages/
42+
Package.pins
4243
# Package.resolved
43-
# *.xcodeproj
44+
*.xcodeproj
4445
#
4546
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
4647
# hence it is not needed unless you have added a package configuration file to your project
@@ -87,4 +88,4 @@ fastlane/test_output
8788
# After new code Injection tools there's a generated folder /iOSInjectionProject
8889
# https://github.com/johnno1962/injectionforxcode
8990

90-
iOSInjectionProject/
91+
iOSInjectionProject/

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Package.resolved

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// swift-tools-version:5.2
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: "HTTPEngine",
8+
platforms: [
9+
.macOS(.v10_15),
10+
.iOS(.v13)
11+
],
12+
products: [
13+
// Products define the executables and libraries produced by a package, and make them visible to other packages.
14+
.library(
15+
name: "HTTPEngine",
16+
targets: ["HTTPEngine"]),
17+
],
18+
dependencies: [
19+
.package(url: "https://github.com/AliSoftware/OHHTTPStubs.git", .upToNextMajor(from: "9.0.0"))
20+
],
21+
targets: [
22+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
23+
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
24+
.target(
25+
name: "HTTPEngine",
26+
dependencies: []),
27+
.testTarget(
28+
name: "HTTPEngineTests",
29+
dependencies: [
30+
"HTTPEngine",
31+
.product(name: "OHHTTPStubs", package: "OHHTTPStubs"),
32+
.product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")]
33+
),
34+
]
35+
)

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# HTTPEngine
2+
3+
A description of this package.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
struct HTTPEngine {
2+
var text = "Hello, World!"
3+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import XCTest
2+
@testable import HTTPEngine
3+
4+
final class HTTPEngineTests: XCTestCase {
5+
func testExample() {
6+
// This is an example of a functional test case.
7+
// Use XCTAssert and related functions to verify your tests produce the correct
8+
// results.
9+
XCTAssertEqual(HTTPEngine().text, "Hello, World!")
10+
}
11+
12+
static var allTests = [
13+
("testExample", testExample),
14+
]
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import XCTest
2+
3+
#if !canImport(ObjectiveC)
4+
public func allTests() -> [XCTestCaseEntry] {
5+
return [
6+
testCase(HTTPEngineTests.allTests),
7+
]
8+
}
9+
#endif

Tests/LinuxMain.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import XCTest
2+
3+
import HTTPEngineTests
4+
5+
var tests = [XCTestCaseEntry]()
6+
tests += HTTPEngineTests.allTests()
7+
XCTMain(tests)

0 commit comments

Comments
 (0)