Skip to content
The Swift Compiler As a Package
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
Documentation
Resources
Sources Fixed parsing of multi‐paragraph markdown quotations. May 22, 2019
Tests Fixed parsing of multi‐paragraph markdown quotations. May 22, 2019
.gitignore
.travis.yml
LICENSE.md Initialized capable of a simple build operation. Apr 23, 2018
Package.resolved
Package.swift
README.md Version 0.10.1 May 22, 2019
Refresh (Linux).sh
Refresh (macOS).command
Workspace.swift

README.md

🇨🇦EN

macOS • Linux

Documentation

SDGSwift

SDGSwift enables use of the Swift compiler as a package dependency.

השֹּׁלֵחַ אִמְרָתוֹ אָרֶץ עַד־מְהֵרָה יָרוּץ דְּבָרוֹ׃
He sends His command to the earth; His word runs swiftly.

                                                                                                    ―a psalmist

Features

  • Compiler operations such as building and testing: SDGSwift, SDGXcode
  • Package Manager operations such as fetching and manifest loading: SDGSwiftPackageManager
  • Utilities for defining configuration files written in Swift (similar to package manifests): SDGSwiftConfiguration, SDGSwiftConfigurationLoading

(For a list of related projects, see here.)

Importing

SDGSwift provides libraries for use with the Swift Package Manager.

Simply add SDGSwift as a dependency in Package.swift and specify which of the libraries to use:

let package = Package(
    name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/SDGGiesbrecht/SDGSwift", .upToNextMinor(from: Version(0, 10, 1))),
    ],
    targets: [
        .target(name: "MyTarget", dependencies: [
            .productItem(name: "SDGSwift", package: "SDGSwift"),
            .productItem(name: "SDGSwiftPackageManager", package: "SDGSwift"),
            .productItem(name: "SDGSwiftSource", package: "SDGSwift"),
            .productItem(name: "SDGXcode", package: "SDGSwift"),
            .productItem(name: "SDGSwiftConfiguration", package: "SDGSwift"),
            .productItem(name: "SDGSwiftConfigurationLoading", package: "SDGSwift"),
            .productItem(name: "SampleConfiguration", package: "SDGSwift"),
        ])
    ]
)

The libraries’ modules can then be imported in source files:

import SDGSwift
import SDGSwiftPackageManager
import SDGSwiftSource
import SDGXcode
import SDGSwiftConfiguration
import SDGSwiftConfigurationLoading
import SampleConfiguration

Example Usage

let package = Package(url: URL(string: "https://github.com/apple/example\u{2D}package\u{2D}dealer")!)
try package.build(.version(Version(2, 0, 0)), to: temporaryDirectory).get()

About

The SDGSwift project is maintained by Jeremy David Giesbrecht.

If SDGSwift saves you money, consider giving some of it as a donation.

If SDGSwift saves you time, consider devoting some of it to contributing back to the project.

Ἄξιος γὰρ ὁ ἐργάτης τοῦ μισθοῦ αὐτοῦ ἐστι.
For the worker is worthy of his wages.

                                                                                                    ―‎ישוע/Yeshuʼa

You can’t perform that action at this time.