Package.swift

// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

// โญ๏ธ Package.swift
// -----------------
// the place where package configuration takes place,
// also called the packageโ€™s manifest file.
//
// Note:
//   must always start with the `// swift-tools-version`
//   string followed by a version number.
//
// ่จป๏ผš
//   "manifest" ็•ถๅฝขๅฎน่ฉžใ€ๅ‹•่ฉžๆ™‚๏ผŒๆœ‰ใ€Œๆ˜Ž้กฏ็š„ใ€ใ€Œ้กฏ็พๅ‡บ...ใ€็š„ๆ„ๆ€๏ผŒ
//   ไฝ†็•ถๅ่ฉžๆ™‚๏ผŒๆœ‰ใ€Œไน˜ๅฎขๅๅ–ฎใ€ๆˆ–ใ€Œ่ฒจๅ–ฎใ€็š„ๆ„ๆ€๏ผŒๆ‰€ไปฅๆˆ‘ๅ€‘ๆ‡‰่ฉฒๅฏไปฅๅฐ‡
//   "package's manifest file" ็†่งฃ็‚บใ€Œๅฅ—ไปถๆธ…ๅ–ฎใ€ใ€‚

import PackageDescription

let package = Package(
    
    name: "MathOpsPackage",
    
    /*
       platforms: (optional parameter)
       must be specified right after the "name" of the package
       -------------------------------------------------------
     
         platforms: [
             SupportedPlatform.iOS(.v11),
             SupportedPlatform.macOS(.v10_14)
         ],
     
       you can omit `SupportedPlatform`
       ---------------------------------
     
         platforms: [
             .iOS(.v11),
             .macOS(.v10_14)
         ]
     
     */
    
    // Define the executables and libraries a package produces,
    // and make them visible to other packages.
    products: [
        .library(
            name: "MathOpsPackage",
            targets: ["MathOpsPackage"]
        ),
    ],
    
    // Declare other packages that this package depends on.
    dependencies: [
        // minimum required version of a dependency
        //.package(url: "https://url/to/cool/dependency", from: "1.0.0"),
        
        // only versions starting from 1.2.3 and ending to 2.3.4
        //.package(url: "https://url/to/cool/dependency", "1.2.3"..."2.3.4"),
    ],
    
    // 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.
    targets: [
        .target(
            name: "MathOpsPackage",
            dependencies: []
        ),
        .testTarget(
            name: "MathOpsPackageTests",
            dependencies: ["MathOpsPackage"]
        ),
    ]
)

Last updated