Swift Packge Manager

跨平台
MAC OS
Ubuntu
Feature Platforms

How to use

SwiftPM Commands
Packages Use Git

Creating:
terminal
mkdir helloworld
cd helloworld/
swift package init --type executable

Run:
open.
swift run

Anatomy of a Package
1.dependencies
2.targets
3.products

Run Tests
swift test --parallel --filter ByteBufferTest

Design of SwiftPM:
fast :isolated build environment
safe :scalable to large dependency graphs
expressive:Swift language manifest format

Support for Building Other Languages
C C++ OC
不支持将其中一个和Swift混合在一个Target

Building
llbuild
SwiftPM's build execution engine
Provides fast and correct incremental builds
Also used by Xcode's new build system
Part of the Swift open source project

Build Environment Isolation:
SwiftPM builds packages in isolation
Builds are sandboxed
No arbitrary commands or shell scripts

Edit Mode
开发多版本

Package.swift Manifest API Evolution:
Package API can be updated with each new Swift version
Previous API is still available
Allows using new Swift tools without updating the manifest
可以指定版本

Publish :
git tag x.x.x

Package Content Verification
安全校验

Cross-Platform Sandboxing

Fork Support

你可能感兴趣的:(Swift Packge Manager)