From 29c7b63352f8ac650511fd37416fc91b03049ecb Mon Sep 17 00:00:00 2001 From: mrustaa Date: Mon, 22 Jun 2020 13:58:52 +0300 Subject: [PATCH] add package --- .../contents.xcworkspacedata | 7 +++ .../1.0.2/ContainerControllerSwift.podspec | 45 ------------------- .../project.pbxproj | 2 +- .../ContainerControllerSwift-Example.xcscheme | 8 ++-- .../contents.xcworkspacedata | 3 ++ Example/Pods/Pods.xcodeproj/project.pbxproj | 20 ++++----- Package.swift | 31 +++++++++++++ .../CollectionAdapterCell.swift | 2 +- .../CollectionAdapterCellData.swift | 2 +- .../CollectionAdapterItem.swift | 2 +- .../CollectionAdapterTypes.swift | 0 .../CollectionAdapterView.swift | 0 .../ContainerController.swift | 2 +- .../ContainerControllerDelegate.swift | 2 +- .../ContainerDevice.swift | 8 +++- .../ContainerLayout.swift | 2 +- .../ContainerTable/TableAdapterCell.swift | 0 .../ContainerTable/TableAdapterCellData.swift | 6 --- .../ContainerTable/TableAdapterItem.swift | 0 .../ContainerTable/TableAdapterTypes.swift | 2 +- .../ContainerTable/TableAdapterView.swift | 2 +- .../ContainerController}/ContainerTypes.swift | 2 + .../ContainerController}/ContainerView.swift | 0 .../ContainerControllerTests.swift | 15 +++++++ .../XCTestManifests.swift | 9 ++++ Tests/LinuxMain.swift | 7 +++ 26 files changed, 104 insertions(+), 75 deletions(-) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata delete mode 100644 ContainerControllerSwift/1.0.2/ContainerControllerSwift.podspec create mode 100644 Package.swift rename {ContainerControllerSwift => Sources/ContainerController}/ContainerCollection/CollectionAdapterCell.swift (99%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerCollection/CollectionAdapterCellData.swift (89%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerCollection/CollectionAdapterItem.swift (95%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerCollection/CollectionAdapterTypes.swift (100%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerCollection/CollectionAdapterView.swift (100%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerController.swift (99%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerControllerDelegate.swift (96%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerDevice.swift (96%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerLayout.swift (99%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerTable/TableAdapterCell.swift (100%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerTable/TableAdapterCellData.swift (66%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerTable/TableAdapterItem.swift (100%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerTable/TableAdapterTypes.swift (95%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerTable/TableAdapterView.swift (99%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerTypes.swift (96%) rename {ContainerControllerSwift => Sources/ContainerController}/ContainerView.swift (100%) create mode 100644 Tests/ContainerControllerTests/ContainerControllerTests.swift create mode 100644 Tests/ContainerControllerTests/XCTestManifests.swift create mode 100644 Tests/LinuxMain.swift 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/ContainerControllerSwift/1.0.2/ContainerControllerSwift.podspec b/ContainerControllerSwift/1.0.2/ContainerControllerSwift.podspec deleted file mode 100644 index 8928851..0000000 --- a/ContainerControllerSwift/1.0.2/ContainerControllerSwift.podspec +++ /dev/null @@ -1,45 +0,0 @@ -# -# Be sure to run `pod lib lint ContainerControllerSwift.podspec' to ensure this is a -# valid spec before submitting. -# -# Any lines starting with a # are optional, but their use is encouraged -# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html -# - -Pod::Spec.new do |s| - s.name = 'ContainerControllerSwift' - s.version = '1.0.2' - s.summary = 'This is a swipe-panel from application: https://www.apple.com/ios/maps/' - -# This description is used to generate tags and improve search results. -# * Think: What does it do? Why did you write it? What is the focus? -# * Try to keep it short, snappy and to the point. -# * Write the description between the DESC delimiters below. -# * Finally, don't worry about the indent, CocoaPods strips it! - - s.description = <<-DESC -TODO: Add long description of the pod here. -'This is a swipe-panel from application: https://www.apple.com/ios/maps/' - DESC - - s.homepage = 'https://github.com/mrustaa/ContainerController' - # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { 'rustamburger@gmail.com' => 'rustamburger@gmail.com' } - s.source = { :git => 'https://github.com/mrustaa/ContainerController.git', :tag => s.version.to_s } - # s.social_media_url = 'https://twitter.com/' - - s.swift_version = '5.2.4' - s.ios.deployment_target = '13.0' - - s.source_files = 'ContainerControllerSwift/*.{swift}' - s.source_files = 'ContainerControllerSwift/**/*.{swift}' - - # s.resource_bundles = { - # 'ContainerControllerSwift' => ['ContainerControllerSwift/Assets/*.png'] - # } - - # s.public_header_files = 'Pod/Classes/**/*.h' - # s.frameworks = 'UIKit', 'MapKit' - # s.dependency 'AFNetworking', '~> 2.3' -end diff --git a/Example/ContainerControllerSwift.xcodeproj/project.pbxproj b/Example/ContainerControllerSwift.xcodeproj/project.pbxproj index d3b8af8..d6fada8 100644 --- a/Example/ContainerControllerSwift.xcodeproj/project.pbxproj +++ b/Example/ContainerControllerSwift.xcodeproj/project.pbxproj @@ -228,7 +228,7 @@ 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 84550121AB9630F101ECE515 /* Pods-ContainerControllerSwift_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ContainerControllerSwift_Example.release.xcconfig"; path = "Target Support Files/Pods-ContainerControllerSwift_Example/Pods-ContainerControllerSwift_Example.release.xcconfig"; sourceTree = ""; }; - 95BE06AF27887E1C134436AD /* ContainerControllerSwift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ContainerControllerSwift.podspec; path = ../ContainerControllerSwift.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 95BE06AF27887E1C134436AD /* ContainerControllerSwift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ContainerControllerSwift.podspec; path = ../ContainerControllerSwift.podspec; sourceTree = ""; }; D8903A29B31F63B5A7A8607B /* Pods_ContainerControllerSwift_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ContainerControllerSwift_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DF5E269035BE15FBD5F947F3 /* Pods-ContainerControllerSwift_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ContainerControllerSwift_Tests.release.xcconfig"; path = "Target Support Files/Pods-ContainerControllerSwift_Tests/Pods-ContainerControllerSwift_Tests.release.xcconfig"; sourceTree = ""; }; E0FB46D7C5BC0F8759A83A60 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; diff --git a/Example/ContainerControllerSwift.xcodeproj/xcshareddata/xcschemes/ContainerControllerSwift-Example.xcscheme b/Example/ContainerControllerSwift.xcodeproj/xcshareddata/xcschemes/ContainerControllerSwift-Example.xcscheme index bb091b1..4c5226e 100644 --- a/Example/ContainerControllerSwift.xcodeproj/xcshareddata/xcschemes/ContainerControllerSwift-Example.xcscheme +++ b/Example/ContainerControllerSwift.xcodeproj/xcshareddata/xcschemes/ContainerControllerSwift-Example.xcscheme @@ -15,7 +15,7 @@ @@ -45,7 +45,7 @@ @@ -78,7 +78,7 @@ @@ -95,7 +95,7 @@ diff --git a/Example/ContainerControllerSwift.xcworkspace/contents.xcworkspacedata b/Example/ContainerControllerSwift.xcworkspace/contents.xcworkspacedata index 07fc505..7f1e1bb 100644 --- a/Example/ContainerControllerSwift.xcworkspace/contents.xcworkspacedata +++ b/Example/ContainerControllerSwift.xcworkspace/contents.xcworkspacedata @@ -1,6 +1,9 @@ + + diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index f4e6297..8ab8f7a 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -58,28 +58,28 @@ 13296F8F89440216D156B1EF58BBD3FA /* Pods-ContainerControllerSwift_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ContainerControllerSwift_Example-acknowledgements.markdown"; sourceTree = ""; }; 148A1CC4CCA9A45E6679C0483EC257F1 /* Pods_ContainerControllerSwift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ContainerControllerSwift_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 17B800897A944FAFD0416DC3C8A2B9CD /* ContainerControllerSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ContainerControllerSwift.debug.xcconfig; sourceTree = ""; }; - 23B6CA2F0075DF1F0D43741B3188D49C /* ContainerControllerSwift.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = ContainerControllerSwift.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 23B6CA2F0075DF1F0D43741B3188D49C /* ContainerControllerSwift.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = ContainerControllerSwift.podspec; sourceTree = ""; tabWidth = 2; }; 31C6D8CE52D9D44CFE3381837377CCE7 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 32E7EA3D3C16ECD90748D85102DE9F48 /* Pods-ContainerControllerSwift_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ContainerControllerSwift_Tests-umbrella.h"; sourceTree = ""; }; 34B99A079CA33F3CFA10293C249BD2CE /* Pods-ContainerControllerSwift_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ContainerControllerSwift_Example-Info.plist"; sourceTree = ""; }; 3F0346DDED41D0AB543AE2537D7539D6 /* ContainerControllerSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ContainerControllerSwift-Info.plist"; sourceTree = ""; }; - 46ACEFB1249021C900FAAD43 /* ContainerTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerTypes.swift; path = ContainerControllerSwift/ContainerTypes.swift; sourceTree = ""; }; + 46ACEFB1249021C900FAAD43 /* ContainerTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerTypes.swift; path = Sources/ContainerController/ContainerTypes.swift; sourceTree = ""; }; 46ACEFB3249021C900FAAD43 /* TableAdapterCellData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterCellData.swift; sourceTree = ""; }; 46ACEFB4249021C900FAAD43 /* TableAdapterItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterItem.swift; sourceTree = ""; }; 46ACEFB5249021C900FAAD43 /* TableAdapterCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterCell.swift; sourceTree = ""; }; 46ACEFB6249021C900FAAD43 /* TableAdapterView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterView.swift; sourceTree = ""; }; 46ACEFB7249021C900FAAD43 /* TableAdapterTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterTypes.swift; sourceTree = ""; }; - 46ACEFB8249021CA00FAAD43 /* ContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerView.swift; path = ContainerControllerSwift/ContainerView.swift; sourceTree = ""; }; - 46ACEFB9249021CA00FAAD43 /* ContainerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerController.swift; path = ContainerControllerSwift/ContainerController.swift; sourceTree = ""; }; - 46ACEFBA249021CA00FAAD43 /* ContainerLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerLayout.swift; path = ContainerControllerSwift/ContainerLayout.swift; sourceTree = ""; }; + 46ACEFB8249021CA00FAAD43 /* ContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerView.swift; path = Sources/ContainerController/ContainerView.swift; sourceTree = ""; }; + 46ACEFB9249021CA00FAAD43 /* ContainerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerController.swift; path = Sources/ContainerController/ContainerController.swift; sourceTree = ""; }; + 46ACEFBA249021CA00FAAD43 /* ContainerLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerLayout.swift; path = Sources/ContainerController/ContainerLayout.swift; sourceTree = ""; }; 46ACEFBC249021CA00FAAD43 /* CollectionAdapterItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterItem.swift; sourceTree = ""; }; 46ACEFBD249021CA00FAAD43 /* CollectionAdapterCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterCell.swift; sourceTree = ""; }; 46ACEFBE249021CA00FAAD43 /* CollectionAdapterView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterView.swift; sourceTree = ""; }; 46ACEFBF249021CA00FAAD43 /* CollectionAdapterCellData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterCellData.swift; sourceTree = ""; }; 46ACEFC0249021CA00FAAD43 /* CollectionAdapterTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterTypes.swift; sourceTree = ""; }; - 46ACEFC1249021CA00FAAD43 /* ContainerControllerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerControllerDelegate.swift; path = ContainerControllerSwift/ContainerControllerDelegate.swift; sourceTree = ""; }; - 46ACEFC2249021CA00FAAD43 /* ContainerDevice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerDevice.swift; path = ContainerControllerSwift/ContainerDevice.swift; sourceTree = ""; }; + 46ACEFC1249021CA00FAAD43 /* ContainerControllerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerControllerDelegate.swift; path = Sources/ContainerController/ContainerControllerDelegate.swift; sourceTree = ""; }; + 46ACEFC2249021CA00FAAD43 /* ContainerDevice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContainerDevice.swift; path = Sources/ContainerController/ContainerDevice.swift; sourceTree = ""; }; 4EEA0EC0D79861379FB2B1874207A67A /* ContainerControllerSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ContainerControllerSwift-dummy.m"; sourceTree = ""; }; 4FAEEAC4BEF190DBB2A8F50DB74A5DC4 /* Pods-ContainerControllerSwift_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ContainerControllerSwift_Example-frameworks.sh"; sourceTree = ""; }; 82F3FE4320C7E1306E9D6353343C0247 /* ContainerControllerSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ContainerControllerSwift.release.xcconfig; sourceTree = ""; }; @@ -87,7 +87,7 @@ 89922BFA2A740F6B35D8B7F42EC3C4A6 /* Pods-ContainerControllerSwift_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ContainerControllerSwift_Example.release.xcconfig"; sourceTree = ""; }; 9539933A3B21B34CCDEC71F036AEAE32 /* Pods-ContainerControllerSwift_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ContainerControllerSwift_Tests-Info.plist"; sourceTree = ""; }; 9CE04B24AA978789CDFAA23C3FF9D294 /* Pods-ContainerControllerSwift_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ContainerControllerSwift_Tests-dummy.m"; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; }; A44F5E78625C75314837F442526B9F1F /* Pods-ContainerControllerSwift_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ContainerControllerSwift_Tests.debug.xcconfig"; sourceTree = ""; }; C0064E8B7E1FC56F5599EFD271C67594 /* ContainerControllerSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = ContainerControllerSwift.modulemap; sourceTree = ""; }; C492E15579178E6EFA4F7D5E4FD837E3 /* Pods-ContainerControllerSwift_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ContainerControllerSwift_Example-dummy.m"; sourceTree = ""; }; @@ -156,7 +156,7 @@ 46ACEFB7249021C900FAAD43 /* TableAdapterTypes.swift */, ); name = ContainerTable; - path = ContainerControllerSwift/ContainerTable; + path = Sources/ContainerController/ContainerTable; sourceTree = ""; }; 46ACEFBB249021CA00FAAD43 /* ContainerCollection */ = { @@ -169,7 +169,7 @@ 46ACEFC0249021CA00FAAD43 /* CollectionAdapterTypes.swift */, ); name = ContainerCollection; - path = ContainerControllerSwift/ContainerCollection; + path = Sources/ContainerController/ContainerCollection; sourceTree = ""; }; 60BF066757F56B86BB1CBE3EBB71A70A /* Support Files */ = { diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..cc70b09 --- /dev/null +++ b/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "ContainerController", + platforms: [ + .iOS(.v13), + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "ContainerController", + targets: ["ContainerController"]), + ], + 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 which this package depends on. + .target( + name: "ContainerController", + dependencies: []), + .testTarget( + name: "ContainerControllerTests", + dependencies: ["ContainerController"]), + ] +) diff --git a/ContainerControllerSwift/ContainerCollection/CollectionAdapterCell.swift b/Sources/ContainerController/ContainerCollection/CollectionAdapterCell.swift similarity index 99% rename from ContainerControllerSwift/ContainerCollection/CollectionAdapterCell.swift rename to Sources/ContainerController/ContainerCollection/CollectionAdapterCell.swift index 25370ec..6d95c16 100644 --- a/ContainerControllerSwift/ContainerCollection/CollectionAdapterCell.swift +++ b/Sources/ContainerController/ContainerCollection/CollectionAdapterCell.swift @@ -1,5 +1,5 @@ // -// ColletionAdapterCell.swift +// CollectionAdapterCell.swift // PatternsSwift // // Created by mrustaa on 01/05/2020. diff --git a/ContainerControllerSwift/ContainerCollection/CollectionAdapterCellData.swift b/Sources/ContainerController/ContainerCollection/CollectionAdapterCellData.swift similarity index 89% rename from ContainerControllerSwift/ContainerCollection/CollectionAdapterCellData.swift rename to Sources/ContainerController/ContainerCollection/CollectionAdapterCellData.swift index da812d2..575aed5 100644 --- a/ContainerControllerSwift/ContainerCollection/CollectionAdapterCellData.swift +++ b/Sources/ContainerController/ContainerCollection/CollectionAdapterCellData.swift @@ -1,5 +1,5 @@ // -// ColletionAdapterCellData.swift +// CollectionAdapterCellData.swift // PatternsSwift // // Created by mrustaa on 01/05/2020. diff --git a/ContainerControllerSwift/ContainerCollection/CollectionAdapterItem.swift b/Sources/ContainerController/ContainerCollection/CollectionAdapterItem.swift similarity index 95% rename from ContainerControllerSwift/ContainerCollection/CollectionAdapterItem.swift rename to Sources/ContainerController/ContainerCollection/CollectionAdapterItem.swift index c7489bf..082ef20 100644 --- a/ContainerControllerSwift/ContainerCollection/CollectionAdapterItem.swift +++ b/Sources/ContainerController/ContainerCollection/CollectionAdapterItem.swift @@ -1,5 +1,5 @@ // -// ColletionAdapterItem.swift +// CollectionAdapterItem.swift // PatternsSwift // // Created by mrustaa on 01/05/2020. diff --git a/ContainerControllerSwift/ContainerCollection/CollectionAdapterTypes.swift b/Sources/ContainerController/ContainerCollection/CollectionAdapterTypes.swift similarity index 100% rename from ContainerControllerSwift/ContainerCollection/CollectionAdapterTypes.swift rename to Sources/ContainerController/ContainerCollection/CollectionAdapterTypes.swift diff --git a/ContainerControllerSwift/ContainerCollection/CollectionAdapterView.swift b/Sources/ContainerController/ContainerCollection/CollectionAdapterView.swift similarity index 100% rename from ContainerControllerSwift/ContainerCollection/CollectionAdapterView.swift rename to Sources/ContainerController/ContainerCollection/CollectionAdapterView.swift diff --git a/ContainerControllerSwift/ContainerController.swift b/Sources/ContainerController/ContainerController.swift similarity index 99% rename from ContainerControllerSwift/ContainerController.swift rename to Sources/ContainerController/ContainerController.swift index 03a7b09..920d3c7 100644 --- a/ContainerControllerSwift/ContainerController.swift +++ b/Sources/ContainerController/ContainerController.swift @@ -1,5 +1,5 @@ // -// ContainerView.swift +// ContainerController.swift // PatternsSwift // // Created by mrustaa on 21/04/2020. diff --git a/ContainerControllerSwift/ContainerControllerDelegate.swift b/Sources/ContainerController/ContainerControllerDelegate.swift similarity index 96% rename from ContainerControllerSwift/ContainerControllerDelegate.swift rename to Sources/ContainerController/ContainerControllerDelegate.swift index b694ac5..67633a0 100644 --- a/ContainerControllerSwift/ContainerControllerDelegate.swift +++ b/Sources/ContainerController/ContainerControllerDelegate.swift @@ -1,5 +1,5 @@ // -// ContainerView.swift +// ContainerControllerDelegate.swift // PatternsSwift // // Created by mrustaa on 21/04/2020. diff --git a/ContainerControllerSwift/ContainerDevice.swift b/Sources/ContainerController/ContainerDevice.swift similarity index 96% rename from ContainerControllerSwift/ContainerDevice.swift rename to Sources/ContainerController/ContainerDevice.swift index 3c92203..3c5298e 100644 --- a/ContainerControllerSwift/ContainerDevice.swift +++ b/Sources/ContainerController/ContainerDevice.swift @@ -1,4 +1,10 @@ - +// +// ContainerDevice.swift +// PatternsSwift +// +// Created by mrustaa on 21/04/2020. +// Copyright © 2020 mrustaa. All rights reserved. +// import UIKit diff --git a/ContainerControllerSwift/ContainerLayout.swift b/Sources/ContainerController/ContainerLayout.swift similarity index 99% rename from ContainerControllerSwift/ContainerLayout.swift rename to Sources/ContainerController/ContainerLayout.swift index eb46b87..63e3de8 100644 --- a/ContainerControllerSwift/ContainerLayout.swift +++ b/Sources/ContainerController/ContainerLayout.swift @@ -1,5 +1,5 @@ // -// ContainerView.swift +// ContainerLayout.swift // PatternsSwift // // Created by mrustaa on 21/04/2020. diff --git a/ContainerControllerSwift/ContainerTable/TableAdapterCell.swift b/Sources/ContainerController/ContainerTable/TableAdapterCell.swift similarity index 100% rename from ContainerControllerSwift/ContainerTable/TableAdapterCell.swift rename to Sources/ContainerController/ContainerTable/TableAdapterCell.swift diff --git a/ContainerControllerSwift/ContainerTable/TableAdapterCellData.swift b/Sources/ContainerController/ContainerTable/TableAdapterCellData.swift similarity index 66% rename from ContainerControllerSwift/ContainerTable/TableAdapterCellData.swift rename to Sources/ContainerController/ContainerTable/TableAdapterCellData.swift index d595af0..b66c0b3 100644 --- a/ContainerControllerSwift/ContainerTable/TableAdapterCellData.swift +++ b/Sources/ContainerController/ContainerTable/TableAdapterCellData.swift @@ -10,12 +10,6 @@ import UIKit open class TableAdapterCellData: NSObject { -// public let cellIdentifier: String -// -// public init(cellIdentifier: String? = UUID().uuidString) { -// self.cellIdentifier = cellIdentifier ?? UUID().uuidString -// } - open func cellHeight() -> CGFloat { return UITableView.automaticDimension } diff --git a/ContainerControllerSwift/ContainerTable/TableAdapterItem.swift b/Sources/ContainerController/ContainerTable/TableAdapterItem.swift similarity index 100% rename from ContainerControllerSwift/ContainerTable/TableAdapterItem.swift rename to Sources/ContainerController/ContainerTable/TableAdapterItem.swift diff --git a/ContainerControllerSwift/ContainerTable/TableAdapterTypes.swift b/Sources/ContainerController/ContainerTable/TableAdapterTypes.swift similarity index 95% rename from ContainerControllerSwift/ContainerTable/TableAdapterTypes.swift rename to Sources/ContainerController/ContainerTable/TableAdapterTypes.swift index a1ec91d..5398be2 100644 --- a/ContainerControllerSwift/ContainerTable/TableAdapterTypes.swift +++ b/Sources/ContainerController/ContainerTable/TableAdapterTypes.swift @@ -1,5 +1,5 @@ // -// ContainerTypes.swift +// TableAdapterTypes.swift // PatternsSwift // // Created by mrustaa on 21/04/2020. diff --git a/ContainerControllerSwift/ContainerTable/TableAdapterView.swift b/Sources/ContainerController/ContainerTable/TableAdapterView.swift similarity index 99% rename from ContainerControllerSwift/ContainerTable/TableAdapterView.swift rename to Sources/ContainerController/ContainerTable/TableAdapterView.swift index 0e957b9..588ad44 100644 --- a/ContainerControllerSwift/ContainerTable/TableAdapterView.swift +++ b/Sources/ContainerController/ContainerTable/TableAdapterView.swift @@ -1,5 +1,5 @@ // -// BlockTableView.swift +// TableAdapterView.swift // PatternsSwift // // Created by mrustaa on 16/04/2020. diff --git a/ContainerControllerSwift/ContainerTypes.swift b/Sources/ContainerController/ContainerTypes.swift similarity index 96% rename from ContainerControllerSwift/ContainerTypes.swift rename to Sources/ContainerController/ContainerTypes.swift index b692bf2..5dcec02 100644 --- a/ContainerControllerSwift/ContainerTypes.swift +++ b/Sources/ContainerController/ContainerTypes.swift @@ -6,6 +6,8 @@ // Copyright © 2020 mrustaa. All rights reserved. // +import UIKit + typealias ContainerCompletion = () -> Void public enum ContainerMoveType { diff --git a/ContainerControllerSwift/ContainerView.swift b/Sources/ContainerController/ContainerView.swift similarity index 100% rename from ContainerControllerSwift/ContainerView.swift rename to Sources/ContainerController/ContainerView.swift diff --git a/Tests/ContainerControllerTests/ContainerControllerTests.swift b/Tests/ContainerControllerTests/ContainerControllerTests.swift new file mode 100644 index 0000000..ce37b5f --- /dev/null +++ b/Tests/ContainerControllerTests/ContainerControllerTests.swift @@ -0,0 +1,15 @@ +import XCTest +@testable import ContainerController + +final class ContainerControllerTests: XCTestCase { + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. +// XCTAssertEqual(ContainerController().text, "Hello, World!") + } + + static var allTests = [ + ("testExample", testExample), + ] +} diff --git a/Tests/ContainerControllerTests/XCTestManifests.swift b/Tests/ContainerControllerTests/XCTestManifests.swift new file mode 100644 index 0000000..44ed841 --- /dev/null +++ b/Tests/ContainerControllerTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !canImport(ObjectiveC) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(ContainerControllerTests.allTests), + ] +} +#endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..de19068 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import ContainerControllerTests + +var tests = [XCTestCaseEntry]() +tests += ContainerControllerTests.allTests() +XCTMain(tests)