All Downloads are FREE. Search and download functionalities are using the official Maven repository.

swift5.Package.swift.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
// swift-tools-version:5.1

import PackageDescription

let package = Package(
    name: "{{projectName}}",
    platforms: [
        {{#useVapor}}
        .macOS(.v10_15),
        {{/useVapor}}
        {{^useVapor}}
        .iOS(.v11),
        .macOS(.v10_13),
        .tvOS(.v11),
        .watchOS(.v4),
        {{/useVapor}}
    ],
    products: [
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
        .library(
            name: "{{projectName}}",
            targets: ["{{projectName}}"]
        ),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")),
        {{#useAlamofire}}
        .package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.7.0")),
        {{/useAlamofire}}
        {{#usePromiseKit}}
        .package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "6.15.3")),
        {{/usePromiseKit}}
        {{#useRxSwift}}
        .package(url: "https://github.com/ReactiveX/RxSwift", .upToNextMajor(from: "6.2.0")),
        {{/useRxSwift}}
        {{#useVapor}}
        .package(url: "https://github.com/vapor/vapor", from: "4.0.0")
        {{/useVapor}}
    ],
    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: "{{projectName}}",
            dependencies: ["AnyCodable", {{#useVapor}}"Vapor", {{/useVapor}}{{#useAlamofire}}"Alamofire", {{/useAlamofire}}{{#usePromiseKit}}"PromiseKit", {{/usePromiseKit}}{{#useRxSwift}}"RxSwift"{{/useRxSwift}}],
            path: "{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}"
        ),
    ]
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy