From 716fdfb6b24f7821f3c8f4fb304a7f554e178698 Mon Sep 17 00:00:00 2001 From: hwachakarter Date: Tue, 21 Apr 2026 19:39:11 +0900 Subject: [PATCH] initial commit :3 --- .gitignore | 21 +++++++++++++++ Package.swift | 19 ++++++++++++++ Sources/sonya/sonya.swift | 9 +++++++ Sources/sonyalib/.gitignore | 8 ++++++ Sources/sonyalib/Package.swift | 26 +++++++++++++++++++ .../sonyalib/Sources/sonyalib/sonyalib.swift | 2 ++ .../Tests/sonyalibTests/sonyalibTests.swift | 6 +++++ 7 files changed, 91 insertions(+) create mode 100644 .gitignore create mode 100644 Package.swift create mode 100644 Sources/sonya/sonya.swift create mode 100644 Sources/sonyalib/.gitignore create mode 100644 Sources/sonyalib/Package.swift create mode 100644 Sources/sonyalib/Sources/sonyalib/sonyalib.swift create mode 100644 Sources/sonyalib/Tests/sonyalibTests/sonyalibTests.swift diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4aaff6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# macOS +.DS_Store + +# Swift Package Manager +.build/ +/Packages +*.o +*.d + +# Xcode +*.xcodeproj +*.xcworkspace +xcuserdata/ +DerivedData/ + +# SwiftPM config (keep user-specific settings out of repo) +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata + +# Credentials +.netrc diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..44285ab --- /dev/null +++ b/Package.swift @@ -0,0 +1,19 @@ +// swift-tools-version: 6.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "sonya", + dependencies: [ + .package(path: "Sources/sonyalib"), + ], + targets: [ + .executableTarget( + name: "sonya", + dependencies: [ + .product(name: "sonyalib", package: "sonyalib"), + ] + ), + ] +) diff --git a/Sources/sonya/sonya.swift b/Sources/sonya/sonya.swift new file mode 100644 index 0000000..6727fe1 --- /dev/null +++ b/Sources/sonya/sonya.swift @@ -0,0 +1,9 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book + +@main +struct sonya { + static func main() { + print("Hello, world!") + } +} diff --git a/Sources/sonyalib/.gitignore b/Sources/sonyalib/.gitignore new file mode 100644 index 0000000..0023a53 --- /dev/null +++ b/Sources/sonyalib/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Sources/sonyalib/Package.swift b/Sources/sonyalib/Package.swift new file mode 100644 index 0000000..e4be196 --- /dev/null +++ b/Sources/sonyalib/Package.swift @@ -0,0 +1,26 @@ +// swift-tools-version: 6.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "sonyalib", + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "sonyalib", + targets: ["sonyalib"] + ), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "sonyalib" + ), + .testTarget( + name: "sonyalibTests", + dependencies: ["sonyalib"] + ), + ] +) diff --git a/Sources/sonyalib/Sources/sonyalib/sonyalib.swift b/Sources/sonyalib/Sources/sonyalib/sonyalib.swift new file mode 100644 index 0000000..08b22b8 --- /dev/null +++ b/Sources/sonyalib/Sources/sonyalib/sonyalib.swift @@ -0,0 +1,2 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book diff --git a/Sources/sonyalib/Tests/sonyalibTests/sonyalibTests.swift b/Sources/sonyalib/Tests/sonyalibTests/sonyalibTests.swift new file mode 100644 index 0000000..9bcae9b --- /dev/null +++ b/Sources/sonyalib/Tests/sonyalibTests/sonyalibTests.swift @@ -0,0 +1,6 @@ +import Testing +@testable import sonyalib + +@Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. +}