美文网首页
swift package

swift package

作者: 老猫_2017 | 来源:发表于2020-08-17 14:06 被阅读0次
    $ mkdir TodoKit
    $ cd TodoKit
    $ swift package init
    
    
    // Depending on a branch (master in this case):
    .package(
        url: "https://github.com/johnsundell/files.git",
        .branch("master")
    )
    
    // Depending on an exact commit:
    .package(
        url: "https://github.com/johnsundell/files.git",
        .revision("0e0c6aca147add5d5750ecb7810837ef4fd10fc2")
    )
    
    .package(
        url: "https://github.com/johnsundell/files.git",
        .exact("4.0.0")
    )
    
    let package = Package(
        ...
        dependencies: [
            .package(
                url: "https://github.com/johnsundell/files.git",
                .exact("4.0.0")
            ),
            // Using 'path', we can depend on a local package that's
            // located at a given path relative to our package's folder:
            .package(path: "../CalendarKit")
        ],
        targets: [
            .target(
                name: "TodoKit",
                dependencies: ["Files", "CalendarKit"]
            ),
            .testTarget(
                name: "TodoKitTests",
                dependencies: ["TodoKit"]
            )
        ]
    )
    
    // swift-tools-version:5.1
    
    import PackageDescription
    
    let package = Package(
        name: "TodoSwiftUIComponents",
        platforms: [.iOS(.v13)],
        ...
    )
    

    相关文章

      网友评论

          本文标题:swift package

          本文链接:https://www.haomeiwen.com/subject/uuhqjktx.html