- Manifest Spec
Manifest file can be written in YAML. Required properties are marked with checkbox. Manifest file should be named package.yml
and should be located at the root of package (like vanilla Pacakge.swift
file). package.yml
has structure of Package
object at the top level and can be ympty if needed.
Manifest depends on Packagefile
that allows to omit some repeating properties (like swiftToolsVersion
or platforms
) by declaring them in Packagefile
as default to reduce manifest files size.
Here is an exapmle of project hierarchy before and after running pkgen generate
command:
Before generation
project_root/
├── ...
├── Packagefile
└── packages/
├── PackageA/
├── Sources/...
└── package.yml
├── PackageB/
├── Sources/...
└── package.yml
└── PackageC/
├── Sources/...
└── package.yml
After generation
project_root/
├── ...
├── Packagefile
└── packages/
├── PackageA/
├── Sources/...
├── Package.swift
└── package.yml
├── PackageB/
├── Sources/...
├── Package.swift
└── package.yml
└── PackageC/
├── Sources/...
├── Package.swift
└── package.yml
type: object
- swiftToolsVersion:
String
- Value fromPackagefile
(if any) will be used if not presented. IfPackagefile
and manifest don't have this property parsing will fail- name:
String
- Directory name where this file located will be used if not presented- defaultLocalization:
String
- Value fromPackagefile
(if any) will be used if not presented- platforms:
Platforms
- Value fromPackagefile
(if any) will be used if not presented- pkgConfig:
String
- Value fromPackagefile
(if any) will be used if not presented- providers:
[Provider]
- Value fromPackagefile
(if any) will be used if not presented- products:
[Product]
- Single default product will be used if not presented:- dependenies:
[PackageDependency]
- targets:
[Target]
- Single default target will be used if not presented:- swiftLanguageVersions:
[SwiftVersion]
- Value fromPackagefile
(if any) will be used if not presented- cLanguageStandard:
CStandard
- Value fromPackagefile
(if any) will be used if not presented- cxxLanguageStandard:
CXXStandard
- Value fromPackagefile
(if any) will be used if not presented
Default product
type: library
name: <provided_name>
targets:
- <provided_name>
Default target
type: target
name: <provided_name>
dependencies:
- <provided_name>
path: Sources
type: object
- iOS:
IOSVersion
- macOS:
MacOSVersion
- tvOS:
TVOSVersion
- watchOS:
WatchOSVersion
type: enum
v8
v9
v10
v11
v12
v13
v14
type: enum
v10_10
v10_11
v10_12
v10_13
v10_14
v10_15
v11
type: enum
v9
v10
v11
v12
v13
v14
type: enum
v2
v3
v4
v5
v6
v7
type: object
- type =
apt
- packages:
[String]
or
- type =
brew
- packages:
[String]
or
- type =
yum
- packages:
[String]
type: object
- type =
executable
- name:
String
- targets:
[String]
or
- type =
library
- name:
String
- targets:
[String]
- linking:
LinkingType
-auto
by default
type: enum
static
dynamic
auto
type: object or string
- If string is provided, parser will search for dependency with same id in
Packagefile
firstly. - If
Packagefile
's dependency were not found and string represents some local path (i.e. it contains'/'
), parser will search for package at provided path. - If provided string isn't local path (i.e. doesn't contain
'/'
), parser will search for local package at'../<PROVIDED_STRING>'
path by default.
'SomeDependencyIDFromPackagefile'
or
'../../some/path/to/local/package'
or
'OtherLocalPackageName'
or
- path:
String
- name:
String
or
- url:
String
- from:
String
- name:
String
or
- url:
String
- branch:
String
- name:
String
or
- url:
String
- exact:
String
- name:
String
or
- url:
String
- revision:
String
- name:
String
or
- url:
String
- upToNextMajor:
String
- name:
String
or
- url:
String
- upToNextMinor:
String
- name:
String
or
- url:
String
- from:
String
- to:
String
- name:
String
or
- url:
String
- from:
String
- upTo:
String
- name:
String
type: object
- type =
binaryTarget
- name:
String
- path:
String
or
- type =
binaryTarget
- name:
String
- url:
String
- checksum:
String
or
- type =
systemLibrary
- name:
String
- path:
String
- pkgConfig:
String
- providers:
[Provider]
or
- type =
target
- name:
String
- dependencies:
[TargetDependency]
- path:
String
- exclude:
[String]
- sources:
[String]
- resources:
[Resource]
- publicHeadersPath:
String
- cSettings:
[CSetting]
- cxxSettings:
[CXXSetting]
- swiftSettings:
[SwiftSetting]
- linkerSettings:
[LinkerSetting]
or
- type =
testTarget
- name:
String
- dependencies:
[TargetDependency]
- path:
String
- exclude:
[String]
- sources:
[String]
- resources:
[Resource]
- publicHeadersPath:
String
- cSettings:
[CSetting]
- cxxSettings:
[CXXSetting]
- swiftSettings:
[SwiftSetting]
- linkerSettings:
[LinkerSetting]
type: object or string
- type =
byName
- name:
String
- condition:
TargetDependencyCondition
or
- type =
product
- name:
String
- package:
String
- condition:
TargetDependencyCondition
or
- type =
target
- name:
String
- condition:
TargetDependencyCondition
type: object
- type =
when
- platforms:
[Platform]
type: object
- type =
copy
- path:
String
or
- type =
process
- path:
String
- localization:
ResourceLocalization
type: enum or string
'some_localization_tag'
or
base
default
type: object
- type =
define
- name:
String
- to:
String
- condition:
BuildSettingCondition
or
- type =
headerSearchPath
- path:
String
- condition:
BuildSettingCondition
or
- type =
unsafeFlags
- flags:
[String]
- condition:
BuildSettingCondition
type: object
- type =
define
- name:
String
- to:
String
- condition:
BuildSettingCondition
or
- type =
headerSearchPath
- path:
String
- condition:
BuildSettingCondition
or
- type =
unsafeFlags
- flags:
[String]
- condition:
BuildSettingCondition
type: object
- type =
define
- name:
String
- condition:
BuildSettingCondition
or
- type =
unsafeFlags
- flags:
[String]
- condition:
BuildSettingCondition
type: object
- type =
linkedFramework
- framework:
String
- condition:
BuildSettingCondition
or
- type =
linkedLibrary
- library:
String
- condition:
BuildSettingCondition
or
- type =
unsafeFlags
- flags:
[String]
- condition:
BuildSettingCondition
type: object
- type =
when
- platforms:
[Platform]
- configuration:
BuildConfiguration
type: enum
debug
release
type: enum
android
iOS
linux
macOS
tvOS
wasi
watchOS
windows
type: enum
3
4
4_2
5
type: enum
c89
c90
c99
c11
gnu89
gnu90
gnu99
gnu11
iso9899_1990
iso9899_199409
iso9899_1999
iso9899_2011
type: enum
cxx98
cxx03
cxx11
cxx14
gnucxx98
gnucxx03
gnucxx11
gnucxx14