Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoSax committed Nov 8, 2021
1 parent 641698e commit 57de753
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
#if (os(macOS) || os(iOS) || os(watchOS) || os(tvOS))
let package = Package(
name: "Net",
platforms: [
.macOS(.v10_15)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Net",
targets: ["Net"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Net",
dependencies: []),
.testTarget(
name: "NetTests",
dependencies: ["Net"]),
],
swiftLanguageVersions: [.v5]
)
#else
let package = Package(
name: "Net",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Net",
targets: ["Net"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/OperatorFoundation/NetworkLinux.git", from: "0.4.1")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Net",
dependencies: ["NetworkLinux"]),
.testTarget(
name: "NetTests",
dependencies: ["Net", "NetworkLinux"]),
],
swiftLanguageVersions: [.v5]
)
#endif
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Net
# Net

A description of this package.
9 changes: 9 additions & 0 deletions Sources/Net/Net.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#if (os(macOS) || os(iOS) || os(watchOS) || os(tvOS))

@_exported import Network

#else

@_exported import NetworkLinux

#endif
10 changes: 10 additions & 0 deletions Tests/NetTests/NetTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import XCTest
@testable import Net

final class NetTests: XCTestCase {
func testExample() throws {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
}
}

0 comments on commit 57de753

Please sign in to comment.