Skip to content

Commit

Permalink
Update default Package.swift to 5.9
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Liu <[email protected]>
  • Loading branch information
andy0808 committed Aug 3, 2023
1 parent 57a55c4 commit 2194020
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions mm/src/spm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,60 @@
from pathlib import Path
import util, log

DEFAULT_LIB_MANIFEST = """// swift-tools-version:5.7
DEFAULT_LIB_MANIFEST = """// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "{name}",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "{name}",
targets: ["{name}"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/madmachineio/SwiftIO.git", branch: "main"),
],
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.
// 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: "{name}",
dependencies: ["SwiftIO"]),
name: "{name}"),
.testTarget(
name: "{name}Tests",
dependencies: ["{name}"]),
]
)
"""

DEFAULT_EXE_MANIFEST = """// swift-tools-version:5.7
DEFAULT_EXE_MANIFEST = """// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "{name}",
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/madmachineio/SwiftIO.git", branch: "main"),
.package(url: "https://github.com/madmachineio/MadBoards.git", branch: "main"),
.package(url: "https://github.com/madmachineio/MadDrivers.git", branch: "main"),
// .package(url: "https://github.com/madmachineio/MadDrivers.git", branch: "main"),
],
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.
// 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.
.executableTarget(
name: "{name}",
dependencies: [
"SwiftIO",
"MadBoards",
// use specific library would speed up the compile procedure
.product(name: "MadDrivers", package: "MadDrivers")
// Use specific library name rather than "MadDrivers" would speed up the build procedure.
// .product(name: "MadDrivers", package: "MadDrivers")
]),
.testTarget(
name: "{name}Tests",
dependencies: ["{name}"]),
]
)
"""


PKG_DESCRIBE_JSON = ''


Expand Down

0 comments on commit 2194020

Please sign in to comment.