From 881b43565fbaa01f403854f3815efac66800f8be Mon Sep 17 00:00:00 2001 From: Vladislav Prusakov Date: Sun, 6 Oct 2019 03:43:07 +0300 Subject: [PATCH 1/2] Added Swift PM --- .gitignore | 1 + Locatable.podspec | 2 +- Package.swift | 30 +++++++++++++++++++ .../Locatable.xcodeproj/project.pbxproj | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 {Locatable => Sources}/Locatable/Info.plist | 0 {Locatable => Sources}/Locatable/Locatable.h | 0 .../Locatable/Locatable.swift | 0 .../LocatableTests/Info.plist | 0 .../LocatableTests/LocatableTests.swift | 0 10 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Package.swift rename {Locatable => Sources}/Locatable.xcodeproj/project.pbxproj (100%) rename {Locatable => Sources}/Locatable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {Locatable => Sources}/Locatable/Info.plist (100%) rename {Locatable => Sources}/Locatable/Locatable.h (100%) rename {Locatable => Sources}/Locatable/Locatable.swift (100%) rename {Locatable => Sources}/LocatableTests/Info.plist (100%) rename {Locatable => Sources}/LocatableTests/LocatableTests.swift (100%) diff --git a/.gitignore b/.gitignore index 312d1f6..ad2f981 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ playground.xcworkspace # Package.pins # Package.resolved .build/ +.swiftpm/ # CocoaPods # diff --git a/Locatable.podspec b/Locatable.podspec index ad034bf..eecf6dd 100644 --- a/Locatable.podspec +++ b/Locatable.podspec @@ -43,6 +43,6 @@ controller.work() // I'm performing a service 😊 s.framework = 'Foundation' - s.source_files = 'Locatable/Locatable/**/*.swift' + s.source_files = 'Sources/Locatable/**/*.swift' end diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..af4ba36 --- /dev/null +++ b/Package.swift @@ -0,0 +1,30 @@ +// swift-tools-version:5.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Locatable", + platforms: [.iOS(.v9)], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "Locatable", + targets: ["Locatable"]), + ], + 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: "Locatable", + dependencies: []), + .testTarget( + name: "LocatableTests", + dependencies: ["Locatable"]), + ) + ] +) diff --git a/Locatable/Locatable.xcodeproj/project.pbxproj b/Sources/Locatable.xcodeproj/project.pbxproj similarity index 100% rename from Locatable/Locatable.xcodeproj/project.pbxproj rename to Sources/Locatable.xcodeproj/project.pbxproj diff --git a/Locatable/Locatable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sources/Locatable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Locatable/Locatable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Sources/Locatable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Locatable/Locatable/Info.plist b/Sources/Locatable/Info.plist similarity index 100% rename from Locatable/Locatable/Info.plist rename to Sources/Locatable/Info.plist diff --git a/Locatable/Locatable/Locatable.h b/Sources/Locatable/Locatable.h similarity index 100% rename from Locatable/Locatable/Locatable.h rename to Sources/Locatable/Locatable.h diff --git a/Locatable/Locatable/Locatable.swift b/Sources/Locatable/Locatable.swift similarity index 100% rename from Locatable/Locatable/Locatable.swift rename to Sources/Locatable/Locatable.swift diff --git a/Locatable/LocatableTests/Info.plist b/Sources/LocatableTests/Info.plist similarity index 100% rename from Locatable/LocatableTests/Info.plist rename to Sources/LocatableTests/Info.plist diff --git a/Locatable/LocatableTests/LocatableTests.swift b/Sources/LocatableTests/LocatableTests.swift similarity index 100% rename from Locatable/LocatableTests/LocatableTests.swift rename to Sources/LocatableTests/LocatableTests.swift From f0f1a11a30aba1825fbe90d3d3a7ae7aafbdab07 Mon Sep 17 00:00:00 2001 From: Vladislav Prusakov Date: Sun, 6 Oct 2019 03:44:15 +0300 Subject: [PATCH 2/2] Fix Package.swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index af4ba36..9b65cae 100644 --- a/Package.swift +++ b/Package.swift @@ -24,7 +24,7 @@ let package = Package( dependencies: []), .testTarget( name: "LocatableTests", - dependencies: ["Locatable"]), + dependencies: ["Locatable"] ) ] )