From bb0472911b572d4bda9b59570613523a7379a11f Mon Sep 17 00:00:00 2001 From: Christian Risi <75698846+CnF-Gris@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:08:51 +0100 Subject: [PATCH] Initial Commit --- .devcontainer/devcontainer.json | 41 +++++++++++++++++++ Package.swift | 26 ++++++++++++ Private/.gitkeep | 0 .../Interfaces/Environment.swift | 3 ++ .../IoT_Simulator_Core.swift | 2 + .../IoT_Simulator_CoreTests.swift | 6 +++ 6 files changed, 78 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 Package.swift create mode 100644 Private/.gitkeep create mode 100644 Sources/IoT-Simulator-Core/Interfaces/Environment.swift create mode 100644 Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift create mode 100644 Tests/IoT-Simulator-CoreTests/IoT_Simulator_CoreTests.swift diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..d27878f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,41 @@ +{ + // Displayed name + "name": "IoT-Simulator-Core", + + // Image to be used + "image": "swift", + + // Customization + "customizations": { + "vscode": { + "extensions": [ + "sswg.swift-lang" + ] + } + }, + + // Env in container + "containerEnv": { + + }, + + // Mounts in container + "mounts": [ + { + "source": "${localWorkspaceFolder}", + "target": "/workspace", + "type": "bind" + } + ], + + // The WorkspaceFolder inside container + "workspaceFolder": "/workspace", + + // RunArgs + "runArgs": [ + "--name", + "IoT-Simulator-Core" + ] + + +} \ No newline at end of file diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..9165aa5 --- /dev/null +++ b/Package.swift @@ -0,0 +1,26 @@ +// 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: "IoT-Simulator-Core", + defaultLocalization: LanguageTag(stringLiteral: "en-US"), + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "IoT-Simulator-Core", + targets: ["IoT-Simulator-Core"]) + ], + dependencies: [], + 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: "IoT-Simulator-Core"), + .testTarget( + name: "IoT-Simulator-CoreTests", + dependencies: ["IoT-Simulator-Core"] + ), + ] +) diff --git a/Private/.gitkeep b/Private/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Sources/IoT-Simulator-Core/Interfaces/Environment.swift b/Sources/IoT-Simulator-Core/Interfaces/Environment.swift new file mode 100644 index 0000000..b04b5c0 --- /dev/null +++ b/Sources/IoT-Simulator-Core/Interfaces/Environment.swift @@ -0,0 +1,3 @@ +public func sleepAndPrint() async { + +} \ No newline at end of file diff --git a/Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift b/Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift new file mode 100644 index 0000000..08b22b8 --- /dev/null +++ b/Sources/IoT-Simulator-Core/IoT_Simulator_Core.swift @@ -0,0 +1,2 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book diff --git a/Tests/IoT-Simulator-CoreTests/IoT_Simulator_CoreTests.swift b/Tests/IoT-Simulator-CoreTests/IoT_Simulator_CoreTests.swift new file mode 100644 index 0000000..4b14fdb --- /dev/null +++ b/Tests/IoT-Simulator-CoreTests/IoT_Simulator_CoreTests.swift @@ -0,0 +1,6 @@ +import Testing +@testable import IoT_Simulator_Core + +@Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. +}