From a8807af38f92f3c774244572c4066571ec2e6562 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Mon, 4 Nov 2024 13:41:30 -0600 Subject: feat: Swift Signed-off-by: Matt Strapp --- .gitignore | 66 ++++++++++++++++++++++++++++++++++- Package.swift | 24 +++++++++++++ Sources/locusts/locusts.swift | 2 ++ Tests/locustsTests/locustsTests.swift | 6 ++++ 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 Package.swift create mode 100644 Sources/locusts/locusts.swift create mode 100644 Tests/locustsTests/locustsTests.swift diff --git a/.gitignore b/.gitignore index 211c610..e5e032f 100644 --- a/.gitignore +++ b/.gitignore @@ -1057,4 +1057,68 @@ build-iPhoneSimulator/ .rvmrc # Used by RuboCop. Remote config files pulled in from inherit_from directive. -# .rubocop-https?--* \ No newline at end of file +# .rubocop-https?--* + +# Swift +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## Obj-C/Swift specific +*.hmap + +## App packaging +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +# *.xcodeproj +# +# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata +# hence it is not needed unless you have added a package configuration file to your project +# .swiftpm + +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ +# +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build/ + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. +# Instead, use fastlane to re-generate the screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..d1a00e1 --- /dev/null +++ b/Package.swift @@ -0,0 +1,24 @@ +// swift-tools-version: 6.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "locusts", + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "locusts", + targets: ["locusts"]), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "locusts"), + .testTarget( + name: "locustsTests", + dependencies: ["locusts"] + ), + ] +) diff --git a/Sources/locusts/locusts.swift b/Sources/locusts/locusts.swift new file mode 100644 index 0000000..08b22b8 --- /dev/null +++ b/Sources/locusts/locusts.swift @@ -0,0 +1,2 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book diff --git a/Tests/locustsTests/locustsTests.swift b/Tests/locustsTests/locustsTests.swift new file mode 100644 index 0000000..81edfee --- /dev/null +++ b/Tests/locustsTests/locustsTests.swift @@ -0,0 +1,6 @@ +import Testing +@testable import locusts + +@Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. +} -- cgit v1.2.3