Files
XcodeGen/Fixtures/TestProject/spec.yml
T
Brandon Kase 4a54fe6d2a Support file sources
The `sources` key of the project spec only supported directories and not
files. Now it supports both!

This commit introduces a `getSourceFiles` overload that doesn't explicitly
invoke `path.children()`, but instead accepts `children` as a parameter.
This allows us to invoke the `children` overload of getSourceFiles with just
the files we want to include (determined by specifying the sources).

Now for sourcePaths that are files, we group by parents before invoking
getSourceFiles in order to reuse the same groups.
2017-11-01 11:37:19 -07:00

50 lines
1.2 KiB
YAML

name: Project
include: [environments.yml]
options:
bundleIdPrefix: com.project
fileGroups:
- Configs
configFiles:
Test Debug: Configs/config.xcconfig
targets:
App_iOS:
type: application
platform: iOS
sources:
- App_iOS
- StandaloneFiles/Standalone.swift
settings:
PRODUCT_BUNDLE_IDENTIFIER: com.project$(BUNDLE_ID_SUFFIX)
INFOPLIST_FILE: App_iOS/Info.plist
dependencies:
- target: Framework_iOS
- carthage: Alamofire
scheme:
testTargets:
- App_iOS_Tests
postbuildScripts:
- path: scripts/strip-frameworks.sh
name: Strip Unused Architectures from Frameworks
runOnlyWhenInstalling: true
- name: MyScript
script: |
echo "You ran a script!"
Framework:
type: framework
platform: [iOS, tvOS, watchOS, macOS]
sources: Framework
postbuildScripts:
- name: MyScript
path: scripts/script.sh
dependencies:
- carthage: Alamofire
App_iOS_Tests:
type: bundle.unit-test
platform: iOS
sources: App_iOS_Tests
settings:
TEST_HOST: $(BUILT_PRODUCTS_DIR)/TestProject.app/TestProject
INFOPLIST_FILE: TestProjectTests/Info.plist
dependencies:
- target: App_iOS