From 7769bd4336a603742d07e3d6ca16e05fa6cdba38 Mon Sep 17 00:00:00 2001 From: Ihar Katkavets Date: Sat, 26 Aug 2023 15:59:49 +0200 Subject: [PATCH] main Update project structure to avoid locally defined modules --- .gitignore | 1 + Core/Package.swift | 15 --------------- Core/{Sources => }/include/chacha20.c | 0 Core/{Sources => }/include/chacha20.h | 0 Core/{Sources => }/include/encrypt-portable.h | 0 Core/{Sources => include}/module.modulemap | 0 Core/{Sources => }/include/salsa20.c | 0 Core/{Sources => }/include/salsa20.h | 0 Core/{Sources => }/include/twofish.cpp | 0 Core/{Sources => }/include/twofish.h | 0 Package.swift | 10 +++------- 11 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 Core/Package.swift rename Core/{Sources => }/include/chacha20.c (100%) rename Core/{Sources => }/include/chacha20.h (100%) rename Core/{Sources => }/include/encrypt-portable.h (100%) rename Core/{Sources => include}/module.modulemap (100%) rename Core/{Sources => }/include/salsa20.c (100%) rename Core/{Sources => }/include/salsa20.h (100%) rename Core/{Sources => }/include/twofish.cpp (100%) rename Core/{Sources => }/include/twofish.h (100%) diff --git a/.gitignore b/.gitignore index 900d8e2..1e72de1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +build/ .build/ .swiftpm/ /Packages diff --git a/Core/Package.swift b/Core/Package.swift deleted file mode 100644 index ebd9c57..0000000 --- a/Core/Package.swift +++ /dev/null @@ -1,15 +0,0 @@ -// swift-tools-version: 5.8 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "Core", - products: [ - .library(name: "Core", targets: ["Core"]), - ], - targets: [ - .target(name: "Core", - path: "Sources"), - ] -) diff --git a/Core/Sources/include/chacha20.c b/Core/include/chacha20.c similarity index 100% rename from Core/Sources/include/chacha20.c rename to Core/include/chacha20.c diff --git a/Core/Sources/include/chacha20.h b/Core/include/chacha20.h similarity index 100% rename from Core/Sources/include/chacha20.h rename to Core/include/chacha20.h diff --git a/Core/Sources/include/encrypt-portable.h b/Core/include/encrypt-portable.h similarity index 100% rename from Core/Sources/include/encrypt-portable.h rename to Core/include/encrypt-portable.h diff --git a/Core/Sources/module.modulemap b/Core/include/module.modulemap similarity index 100% rename from Core/Sources/module.modulemap rename to Core/include/module.modulemap diff --git a/Core/Sources/include/salsa20.c b/Core/include/salsa20.c similarity index 100% rename from Core/Sources/include/salsa20.c rename to Core/include/salsa20.c diff --git a/Core/Sources/include/salsa20.h b/Core/include/salsa20.h similarity index 100% rename from Core/Sources/include/salsa20.h rename to Core/include/salsa20.h diff --git a/Core/Sources/include/twofish.cpp b/Core/include/twofish.cpp similarity index 100% rename from Core/Sources/include/twofish.cpp rename to Core/include/twofish.cpp diff --git a/Core/Sources/include/twofish.h b/Core/include/twofish.h similarity index 100% rename from Core/Sources/include/twofish.h rename to Core/include/twofish.h diff --git a/Package.swift b/Package.swift index 4a1a71f..e46dc0d 100644 --- a/Package.swift +++ b/Package.swift @@ -5,23 +5,19 @@ import PackageDescription let package = Package( name: "StreamKit", - platforms: [ - .macOS(.v12), - .iOS(.v13) - ], products: [ .library( name: "StreamKit", targets: ["StreamKit"]), ], - dependencies: [ - .package(path: "Core"), - ], targets: [ .target( name: "StreamKit", dependencies: ["Core"], path: "Sources"), + .target( + name: "Core", + path: "Core"), .testTarget( name: "StreamKitTests", dependencies: ["StreamKit"],