From 1725ecd9b28876dbb33697a9ec957a5c7a5cf47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Jagie=C5=82=C5=82o?= Date: Thu, 14 Dec 2023 17:50:05 +0100 Subject: [PATCH] SPM Support --- .../contents.xcworkspacedata | 7 +++++ Package.resolved | 14 ++++++++++ Package.swift | 27 +++++++++++++++++++ .../Stefan}/Enums/ItemReloadingResult.swift | 0 .../Stefan}/Enums/ItemsLoadableState.swift | 0 .../Stefan}/Enums/ReloadingType.swift | 0 .../UICollectionView + ReloadableView.swift | 0 .../UITableView + ReloadableView.swift | 0 ... LoadableStatePlaceholderPresentable.swift | 0 ... LoadableStatePlaceholderPresentable.swift | 0 {Stefan => Sources/Stefan}/Info.plist | 0 .../ItemsLoadableStateBindable.swift | 0 .../Protocols/ItemsLoadableStateDiffer.swift | 0 .../Stefan}/Protocols/LoadableState.swift | 0 ...tatePlaceholderDefaultViewDataSource.swift | 0 .../LoadableStatePlaceholderPresentable.swift | 0 .../Stefan}/Protocols/LoadableStateType.swift | 0 .../Stefan}/Protocols/ReloadableView.swift | 0 {Stefan => Sources/Stefan}/Stefan.h | 0 {Stefan => Sources/Stefan}/Stefan.swift | 0 .../LoadableStatePlaceholderDefaultView.swift | 0 .../Views/LoadableStatePlaceholderView.swift | 0 {StefanTests => Tests}/Fruit.swift | 0 {StefanTests => Tests}/FruitStorage.swift | 0 {StefanTests => Tests}/Info.plist | 0 .../ItemsLoadableStateTests.swift | 0 .../StefanDifferTests.swift | 0 .../StefanTestController.swift | 0 {StefanTests => Tests}/StefanTests.swift | 0 29 files changed, 48 insertions(+) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 Package.resolved create mode 100644 Package.swift rename {Stefan => Sources/Stefan}/Enums/ItemReloadingResult.swift (100%) rename {Stefan => Sources/Stefan}/Enums/ItemsLoadableState.swift (100%) rename {Stefan => Sources/Stefan}/Enums/ReloadingType.swift (100%) rename {Stefan => Sources/Stefan}/Extensions/UICollectionView + ReloadableView.swift (100%) rename {Stefan => Sources/Stefan}/Extensions/UITableView + ReloadableView.swift (100%) rename {Stefan => Sources/Stefan}/Extensions/UIView + LoadableStatePlaceholderPresentable.swift (100%) rename {Stefan => Sources/Stefan}/Extensions/UIViewController + LoadableStatePlaceholderPresentable.swift (100%) rename {Stefan => Sources/Stefan}/Info.plist (100%) rename {Stefan => Sources/Stefan}/Protocols/ItemsLoadableStateBindable.swift (100%) rename {Stefan => Sources/Stefan}/Protocols/ItemsLoadableStateDiffer.swift (100%) rename {Stefan => Sources/Stefan}/Protocols/LoadableState.swift (100%) rename {Stefan => Sources/Stefan}/Protocols/LoadableStatePlaceholderDefaultViewDataSource.swift (100%) rename {Stefan => Sources/Stefan}/Protocols/LoadableStatePlaceholderPresentable.swift (100%) rename {Stefan => Sources/Stefan}/Protocols/LoadableStateType.swift (100%) rename {Stefan => Sources/Stefan}/Protocols/ReloadableView.swift (100%) rename {Stefan => Sources/Stefan}/Stefan.h (100%) rename {Stefan => Sources/Stefan}/Stefan.swift (100%) rename {Stefan => Sources/Stefan}/Views/LoadableStatePlaceholderDefaultView.swift (100%) rename {Stefan => Sources/Stefan}/Views/LoadableStatePlaceholderView.swift (100%) rename {StefanTests => Tests}/Fruit.swift (100%) rename {StefanTests => Tests}/FruitStorage.swift (100%) rename {StefanTests => Tests}/Info.plist (100%) rename {StefanTests => Tests}/ItemsLoadableStateTests.swift (100%) rename {StefanTests => Tests}/StefanDifferTests.swift (100%) rename {StefanTests => Tests}/StefanTestController.swift (100%) rename {StefanTests => Tests}/StefanTests.swift (100%) diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..a866dc7 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "differ", + "kind" : "remoteSourceControl", + "location" : "https://github.com/appunite/Differ", + "state" : { + "revision" : "747d0cce14e8c4e4c52f9267c909d3845494822b", + "version" : "1.4.6" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..3c7aea6 --- /dev/null +++ b/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Stefan", + products: [ + .library( + name: "Stefan", + targets: ["Stefan"] + ), + ], + dependencies: [ + .package(url: "https://github.com/appunite/Differ", exact: "1.4.6") + ], + targets: [ + .target( + name: "Stefan", + dependencies: ["Differ"] + ), + .testTarget( + name: "StefanTests", + dependencies: ["Stefan"] + ), + ] +) diff --git a/Stefan/Enums/ItemReloadingResult.swift b/Sources/Stefan/Enums/ItemReloadingResult.swift similarity index 100% rename from Stefan/Enums/ItemReloadingResult.swift rename to Sources/Stefan/Enums/ItemReloadingResult.swift diff --git a/Stefan/Enums/ItemsLoadableState.swift b/Sources/Stefan/Enums/ItemsLoadableState.swift similarity index 100% rename from Stefan/Enums/ItemsLoadableState.swift rename to Sources/Stefan/Enums/ItemsLoadableState.swift diff --git a/Stefan/Enums/ReloadingType.swift b/Sources/Stefan/Enums/ReloadingType.swift similarity index 100% rename from Stefan/Enums/ReloadingType.swift rename to Sources/Stefan/Enums/ReloadingType.swift diff --git a/Stefan/Extensions/UICollectionView + ReloadableView.swift b/Sources/Stefan/Extensions/UICollectionView + ReloadableView.swift similarity index 100% rename from Stefan/Extensions/UICollectionView + ReloadableView.swift rename to Sources/Stefan/Extensions/UICollectionView + ReloadableView.swift diff --git a/Stefan/Extensions/UITableView + ReloadableView.swift b/Sources/Stefan/Extensions/UITableView + ReloadableView.swift similarity index 100% rename from Stefan/Extensions/UITableView + ReloadableView.swift rename to Sources/Stefan/Extensions/UITableView + ReloadableView.swift diff --git a/Stefan/Extensions/UIView + LoadableStatePlaceholderPresentable.swift b/Sources/Stefan/Extensions/UIView + LoadableStatePlaceholderPresentable.swift similarity index 100% rename from Stefan/Extensions/UIView + LoadableStatePlaceholderPresentable.swift rename to Sources/Stefan/Extensions/UIView + LoadableStatePlaceholderPresentable.swift diff --git a/Stefan/Extensions/UIViewController + LoadableStatePlaceholderPresentable.swift b/Sources/Stefan/Extensions/UIViewController + LoadableStatePlaceholderPresentable.swift similarity index 100% rename from Stefan/Extensions/UIViewController + LoadableStatePlaceholderPresentable.swift rename to Sources/Stefan/Extensions/UIViewController + LoadableStatePlaceholderPresentable.swift diff --git a/Stefan/Info.plist b/Sources/Stefan/Info.plist similarity index 100% rename from Stefan/Info.plist rename to Sources/Stefan/Info.plist diff --git a/Stefan/Protocols/ItemsLoadableStateBindable.swift b/Sources/Stefan/Protocols/ItemsLoadableStateBindable.swift similarity index 100% rename from Stefan/Protocols/ItemsLoadableStateBindable.swift rename to Sources/Stefan/Protocols/ItemsLoadableStateBindable.swift diff --git a/Stefan/Protocols/ItemsLoadableStateDiffer.swift b/Sources/Stefan/Protocols/ItemsLoadableStateDiffer.swift similarity index 100% rename from Stefan/Protocols/ItemsLoadableStateDiffer.swift rename to Sources/Stefan/Protocols/ItemsLoadableStateDiffer.swift diff --git a/Stefan/Protocols/LoadableState.swift b/Sources/Stefan/Protocols/LoadableState.swift similarity index 100% rename from Stefan/Protocols/LoadableState.swift rename to Sources/Stefan/Protocols/LoadableState.swift diff --git a/Stefan/Protocols/LoadableStatePlaceholderDefaultViewDataSource.swift b/Sources/Stefan/Protocols/LoadableStatePlaceholderDefaultViewDataSource.swift similarity index 100% rename from Stefan/Protocols/LoadableStatePlaceholderDefaultViewDataSource.swift rename to Sources/Stefan/Protocols/LoadableStatePlaceholderDefaultViewDataSource.swift diff --git a/Stefan/Protocols/LoadableStatePlaceholderPresentable.swift b/Sources/Stefan/Protocols/LoadableStatePlaceholderPresentable.swift similarity index 100% rename from Stefan/Protocols/LoadableStatePlaceholderPresentable.swift rename to Sources/Stefan/Protocols/LoadableStatePlaceholderPresentable.swift diff --git a/Stefan/Protocols/LoadableStateType.swift b/Sources/Stefan/Protocols/LoadableStateType.swift similarity index 100% rename from Stefan/Protocols/LoadableStateType.swift rename to Sources/Stefan/Protocols/LoadableStateType.swift diff --git a/Stefan/Protocols/ReloadableView.swift b/Sources/Stefan/Protocols/ReloadableView.swift similarity index 100% rename from Stefan/Protocols/ReloadableView.swift rename to Sources/Stefan/Protocols/ReloadableView.swift diff --git a/Stefan/Stefan.h b/Sources/Stefan/Stefan.h similarity index 100% rename from Stefan/Stefan.h rename to Sources/Stefan/Stefan.h diff --git a/Stefan/Stefan.swift b/Sources/Stefan/Stefan.swift similarity index 100% rename from Stefan/Stefan.swift rename to Sources/Stefan/Stefan.swift diff --git a/Stefan/Views/LoadableStatePlaceholderDefaultView.swift b/Sources/Stefan/Views/LoadableStatePlaceholderDefaultView.swift similarity index 100% rename from Stefan/Views/LoadableStatePlaceholderDefaultView.swift rename to Sources/Stefan/Views/LoadableStatePlaceholderDefaultView.swift diff --git a/Stefan/Views/LoadableStatePlaceholderView.swift b/Sources/Stefan/Views/LoadableStatePlaceholderView.swift similarity index 100% rename from Stefan/Views/LoadableStatePlaceholderView.swift rename to Sources/Stefan/Views/LoadableStatePlaceholderView.swift diff --git a/StefanTests/Fruit.swift b/Tests/Fruit.swift similarity index 100% rename from StefanTests/Fruit.swift rename to Tests/Fruit.swift diff --git a/StefanTests/FruitStorage.swift b/Tests/FruitStorage.swift similarity index 100% rename from StefanTests/FruitStorage.swift rename to Tests/FruitStorage.swift diff --git a/StefanTests/Info.plist b/Tests/Info.plist similarity index 100% rename from StefanTests/Info.plist rename to Tests/Info.plist diff --git a/StefanTests/ItemsLoadableStateTests.swift b/Tests/ItemsLoadableStateTests.swift similarity index 100% rename from StefanTests/ItemsLoadableStateTests.swift rename to Tests/ItemsLoadableStateTests.swift diff --git a/StefanTests/StefanDifferTests.swift b/Tests/StefanDifferTests.swift similarity index 100% rename from StefanTests/StefanDifferTests.swift rename to Tests/StefanDifferTests.swift diff --git a/StefanTests/StefanTestController.swift b/Tests/StefanTestController.swift similarity index 100% rename from StefanTests/StefanTestController.swift rename to Tests/StefanTestController.swift diff --git a/StefanTests/StefanTests.swift b/Tests/StefanTests.swift similarity index 100% rename from StefanTests/StefanTests.swift rename to Tests/StefanTests.swift