Migrate to swift package manager

This commit is contained in:
2023-05-28 16:56:23 +09:00
parent c69b00b171
commit 72ee834f6d
40 changed files with 90 additions and 6 deletions

View File

@@ -127,7 +127,8 @@
341F5EF42A0F891200962D48 /* KissAccount.swift */,
341F5F0A2A15115400962D48 /* KissShop.swift */,
);
path = KissMe;
name = KissMe;
path = KissMe/Sources;
sourceTree = "<group>";
};
341F5EB92A0A80EC00962D48 /* KissMeTests */ = {
@@ -135,7 +136,8 @@
children = (
341F5EBA2A0A80EC00962D48 /* KissMeTests.swift */,
);
path = KissMeTests;
name = KissMeTests;
path = KissMe/Tests;
sourceTree = "<group>";
};
341F5EDF2A0F372000962D48 /* Login */ = {

View File

@@ -2,7 +2,7 @@
<Workspace
version = "1.0">
<FileRef
location = "group:KissMeConsole/KissMeConsole.xcodeproj">
location = "group:KissMeConsole.xcodeproj">
</FileRef>
<FileRef
location = "container:KissMe.xcodeproj">

33
KissMe/Package.swift Normal file
View File

@@ -0,0 +1,33 @@
// 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: "KissMe",
platforms: [
.macOS(.v13), .iOS(.v14), .tvOS(.v14)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "KissMe",
targets: ["KissMe"]),
],
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 this package depends on.
.target(
name: "KissMe",
dependencies: [],
path: "Sources"),
.testTarget(
name: "KissMeTests",
dependencies: ["KissMe"],
path: "Tests"),
]
)

View File

@@ -311,7 +311,7 @@ extension KissAccount {
public func cancelOrder() async throws -> Bool {
return try await withUnsafeThrowingContinuation { continuation in
guard let accessToken = accessToken else {
guard let _ = accessToken else {
continuation.resume(throwing: GeneralError.invalidAccessToken)
return
}
@@ -324,7 +324,7 @@ extension KissAccount {
public func changeOrder() async throws -> Bool {
return try await withUnsafeThrowingContinuation { continuation in
guard let accessToken = accessToken else {
guard let _ = accessToken else {
continuation.resume(throwing: GeneralError.invalidAccessToken)
return
}

View File

@@ -84,7 +84,8 @@
341F5F082A1463A100962D48 /* KissConsole.swift */,
349327F62A20E3E300097063 /* ConsoleExtensions.swift */,
);
path = KissMeConsole;
name = KissMeConsole;
path = KissMeConsole/Sources;
sourceTree = "<group>";
};
341F5EDA2A0A8C4600962D48 /* Frameworks */ = {

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,34 @@
// 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: "KissMeConsole",
platforms: [
.macOS(.v13), .iOS(.v14), .tvOS(.v14)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.executable(
name: "KissMeConsole",
targets: ["KissMeConsole"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
//.package(url: "../KissMe", from: "1.0.0"),
.package(path: "../KissMe"),
],
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 this package depends on.
.target(
name: "KissMeConsole",
dependencies: ["KissMe"],
path: "Sources"),
.testTarget(
name: "KissMeConsoleTests",
dependencies: ["KissMeConsole"],
path: "Tests"),
]
)