Commit Graph

736 Commits

Author SHA1 Message Date
freddi(Yuki Aki)
4233cc8578
Support runPostActionsOnFailure on build scheme (#1075)
* supports runPostActionsOnFailure on build scheme

* updates test for runPostActionsOnFailure

update runPostActionsOnFailure tests

* update Docs for runPostActionsOnFailure

* update change log

* Update CHANGELOG.md

* Update CHANGELOG.md
2021-05-06 12:54:33 +10:00
Yonas Kolb
7c510af3d7
Fix Xcode alert on generation (#1072)
* fix xcode warning alert on regeneration

* commit fixture diffs

* update changelog
2021-05-06 08:33:42 +10:00
Yasuharu Yanamura
1df0bb3e7b
Fix no such module 'DOT' by pinning GraphViz 0.2.0 (#1067)
* Revert "Fix no such module 'DOT' (#1065)"

This reverts commit 69a1cd56b5.

* pin GraphViz v0.2.0

* update CHANGELOG
2021-05-05 08:45:42 +10:00
Yasuharu Yanamura
69a1cd56b5
Fix no such module 'DOT' (#1065)
* Update GraphViz to 0.4.0

* Update CHANGELOG.md
2021-05-02 11:55:43 +10:00
Stefano Mondino
dfe7f28bcb
Scheme config variants wrong assignment for similar config names (#976)
* Failing test for #975

* fixes #975

* chore: refactor to properly select a config from a collection with specific variant and config type
chore: updated changelog

* fix: lowercase compare on config variant names

* fix CI

* fix missing scheme for CI

* fix schemes for CI

* Update CHANGELOG.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Update Sources/ProjectSpec/Config.swift

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* - fix compilation issue
- duplicated test for config variant name (uppercase/lowercase)

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-05-01 15:50:39 +10:00
Elliott Williams
fb559ba153
CarthageDependencyResolver: ignore order-only dependencies (#1041)
* CarthageDependencyResolver: ignore target-only dependencies

* Update fixtures for expected changed in watchOS apps' FRAMEWORK_SEARCH_PATHS

* Update CHANGELOG.md
2021-05-01 15:39:55 +10:00
Elliott Williams
35212a6154
Rename Core to avoid collisions with other packages (i.e. GraphViz) (#1057)
* Rename 'Core' to 'XcodeGenCore'

* Update CHANGELOG.md

* Update CHANGELOG.md
2021-05-01 13:39:34 +10:00
freddi(Yuki Aki)
56f943ec01
Support weak link for Swift Package Dependency (#1064)
* support weak link to Swift Package dependency

* update test for weak link

* add changelog about Swift Package Dependency

* Update CHANGELOG.md
2021-05-01 13:09:19 +10:00
Artem Semavin
0ac7a5f8c6
Added support for SelectedTests in schemes Test configuration. (#913)
* added support for selectedTests in test shemes

* added PR description to changelog

* CHANGELOG fix

* use presence of selectedTests for useTestSelectionWhitelist

Co-authored-by: Artem Semavin <Artem Semavin>
Co-authored-by: yonaskolb <yonaskolb@gmail.com>
2021-04-08 23:01:28 +10:00
André
209afcc898
Allowing override LastUpgradeCheck and LastUpgradeVersion (#1013)
* Allowing the property LastUpgradeCheck and LastUpgradeVersion to be overrided

* Updating changelod and project spec

* Updating changelog

Co-authored-by: André Lucas Ota <andrel.ota@PPM-SPO-6835.local>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-04-08 22:20:10 +10:00
Franz Busch
7b8f5a117f
Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)
* Change FRAMEWORK_SEARCH_PATH for xcframeworks

* Apply suggestions from code review

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-04-08 22:20:01 +10:00
Liam Nichols
1b57ba5c75
Improve INFOPLIST_FILE handling to only omit used Info.plist's from Copy Bundle Resources Build Phase (#1027)
* Update TestProject Fixture to include GoogleService-Info.plist resource bsaed on 2.18.0 generator

* Update TestProject fixture to include an Info.plist file named 'App-Info.plist' to simulate scenario in #945

* Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target

* fixup! Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target

* fixup! Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target

* Refactor SourceGenerator to remove some redundant arguments on internal methods when generating source files in a target

* Update SourceGenerator to accept '[Path: BuildPhaseSpec]' of preferred build phases in order to prioritise over 'default' value. Remove explicit Info.plist check from SourceGenerator. Update PBXProjGenerator to inject hash of build phases for resolved INFOPLIST_FILE values. Update SourceGeneratorTests to comply with change where only the FIRST Info.plist is excluded from copy bundle resources build phase, additionally resolve absolute path

* Ensure project.basePath is always absolute when resolving Info.plist path relative to project

* Add test coverage in SourceGeneratorTests.swift

* Update CHANGELOG.md

* Reword CHANGELOG.md
2021-04-08 15:38:21 +10:00
Dale
ff64a4a1cb
Set error message for missing build targets in scheme (#1040)
* Set error message for missing build targets in scheme

The current behavior means it just crashes due to trying to force unwrap
a nil optional.

Note: A build target shouldn't really be needed, but this is just a
quick fix to get things moving again.

* Update changelog
2021-04-01 08:57:42 +11:00
freddi(Yuki Aki)
cf88681749
Support macroExpansion on run scheme (#1036)
* allow to specify macroExpansion on schemes

* fix json parsing on macroExpansion

* set macroExpansion only launch scheme

* add test for macroExpansion

* add macroExpansion description

* add macroExpansion to Change Log

* Update CHANGELOG.md

* add App_Extension scheme for macroExpansion

* change example of macroExpansion in Fixtures project

* fix to keep back to keep back compatibility as possible

* Apply suggestions from code review

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-03-21 20:02:01 +11:00
freddi(Yuki Aki)
f550d01678
Support askForAppToLaunch on profile scheme (#1035)
* add askForAppToLaunch to profile scheme

* add test

* add description for askForAppToLaunch

* add Change Log for askForAppToLaunch

* Update Docs/ProjectSpec.md
2021-03-17 18:10:04 +11:00
Joseph Colicchio
ae186edb68
Bugfix/SimulateLocation Fix (#973)
* Preemptively fix compilation for latest XcodeProj

* Add StoreKitConfiguration to scheme and generator

* Add scheme generator test

* Fix and add tests

* Support StoreKitConfiguration in TargetScheme

* Set default type of `storekit` to `.none`

* Upgrade XcodeProj to 7.15.0

* Create struct for StoreKitConfiguration

* Update tests

* Add storekit configuration to test project

* Update changelog

* Update project spec

* Fix xcodeprojs

* Fix projects

* Capitalize String

* Update CHANGELOG.md

Co-authored-by: Gemma Barlow <gemmakbarlow@gmail.com>

* Refactor StoreKitConfiguration init from json

* Change `forWorkspace` to `pathPrefix` and add tests

* Replace StoreKitConfiguration struct with string + option

* Fix tests

* Update project spec

* Fixup changelog

* Add `See Options` to `storeKitConfiguration` in project spec

* Make `simulateLocation` respect `schemePathPrefix`

* Update docs

Co-authored-by: Gemma Barlow <gemmakbarlow@gmail.com>
2021-02-16 09:35:47 +11:00
Bartosz Polaczyk
2c600a7c64
Add Discovered Dependency File (#1012)
* Upgrade XCodeProj to 7.14.0

* Bump to XcodeProj to fork

* Add script discoveredDependencyFile

* Align cfbundle test

* Add changelog mock

* Update Documentation

* Update SPM manifest

* Change property name

* Verify defult dependency file to nil

* Add JSON encodable test

* Add PR number

Co-authored-by: Fernanda Geraissate <fernandag@spotify.com>
2021-02-15 12:43:41 +11:00
Joseph Colicchio
50aedc4511
Feature/Store Kit Configuration (#964)
* Preemptively fix compilation for latest XcodeProj

* Add StoreKitConfiguration to scheme and generator

* Add scheme generator test

* Fix and add tests

* Support StoreKitConfiguration in TargetScheme

* Set default type of `storekit` to `.none`

* Upgrade XcodeProj to 7.15.0

* Create struct for StoreKitConfiguration

* Update tests

* Add storekit configuration to test project

* Update changelog

* Update project spec

* Fix xcodeprojs

* Fix projects

* Capitalize String

* Update CHANGELOG.md

Co-authored-by: Gemma Barlow <gemmakbarlow@gmail.com>

* Refactor StoreKitConfiguration init from json

* Change `forWorkspace` to `pathPrefix` and add tests

* Replace StoreKitConfiguration struct with string + option

* Fix tests

* Update project spec

* Fixup changelog

* Add `See Options` to `storeKitConfiguration` in project spec

Co-authored-by: Gemma Barlow <gemmakbarlow@gmail.com>
2021-02-15 11:58:16 +11:00
Max Rabiciuc
6b7ab91440
Fix issue where frameworks with MACH_O_TYPE:staticlib were being embedded (#1003) 2021-01-15 09:51:38 +11:00
Sascha Schwabbauer
2277b323f2
Add support for runOncePerArchitecture (#950)
Add changelog and small change

Fix build error
2021-01-13 09:51:11 +11:00
Vasiliy Anisimov
282761cb21
Fixed adding Info.plists with custom names to Copy Bundle Resources build phase (#945)
* Fixed adding Info.plists with custom names to Copy Bundle Resources build phase

- Extended check for Info.plist, because they usually named not just "Info.plist", but "<TargetName>-Info.plist"

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-01-11 13:33:44 +11:00
Jierong Li
04d6749441
Fix a typo (#993)
Rename baseOnDependencyAnalysis to basedOnDependencyAnalysis.
2020-12-03 11:20:13 +11:00
Jierong Li
efed786cec
Add baseOnDependencyAnalysis to Project Spec Build Script (#992)
* Add baseOnDependencyAnalysis to BuildScript

* Add tests for baseOnDependencyAnalysis

* Update CHANGELOG.md
2020-12-03 08:52:24 +11:00
Joseph Colicchio
6a5604f4b0
Project Reference LegacyTarget Crash Fix (#982)
* Avoid force-unwrapping and allow `.none` type target to continue

* Add changelog entry
2020-12-02 13:46:39 +11:00
bannzai
79738b3e95
More detailed error message with method arguments (#990)
* More detailed error message with method arguments

* Add pr title to CHANGELOG.md
2020-12-01 18:46:28 +11:00
Elliott Williams
2601d39792
Support Linux by upgrading XcodeProj and Spectre (#988)
* Bump XcodeProj and Spectre

* Add LinuxMain.swift

* Linux test fixups

* Add CI job for ubuntu-latest

* Use URLs in glob logic to avoid Linux/Mac foundation inconsistencies

* fatalError when --enable-test-discovery is not used

* Update fixtures

They changed because of a bugfix in XcodeProj: https://github.com/tuist/XcodeProj/pull/563

* Update CHANGELOG.md
2020-11-24 11:28:41 +11:00
Liam Nichols
9fdc194771
Add useBaseInternationalization to SpecOptions (#961)
* Add 'useBaseInternationalization' setting to SpecOptions (default value of true)

* Update PBXProjGenerator to only include Base into knownRegions if it was either detected on the filesystem or if the project spec options opt into it

* Update ProjectSpec.md to include useBaseInternationalization

* Update AnotherProject to demonstrate Base Internationalization opt out

* Update CHANGELOG.md
2020-10-13 15:20:53 +11:00
Yonas Kolb
4988388cc5
Update to Xcode 12 (#960)
* update to final xcode 12 version

* only generate and test xcode 12 project

* update default xcode version to 12

* update changelog
2020-10-02 18:42:50 +10:00
Liam Nichols
d959bdfddd
Enable Base Localization by default (#955)
* Update PBXProjGenerator to include 'Base' developmentRegion and file system derived knownRegions in the output knownRegions

* Update CHANGELOG.md

* Run tests to update fixtures
2020-10-02 18:23:38 +10:00
Roman Podymov
742fe69c5b
"Copy only when installing" for "Embed App Extensions" (#948)
* Added onlyCopyExtensionsOnInstall

* Fix for Xcode 12

* Fixed PBXCopyFilesBuildPhase for "Embed App Extensions"

* Test for onlyCopyExtensionsOnInstall

* Update CHANGELOG.md

* Update ProjectSpec.md

* Refactoring

* More tests for onlyCopyExtensionsOnInstall

* Reverted

* Refactoring with getPBXCopyFilesBuildPhase

* Deleted similar tests

* onlyCopyExtensionsOnInstall -> onlyCopyFilesOnInstall

* Update ProjectSpec.md

* Update CHANGELOG.md

* Update ProjectGeneratorTests.swift
2020-10-02 17:48:32 +10:00
Cody Vandermyn
43177dec49
Select the first runnable target (#957)
* Select the first runnable target, if there is one

Instead of just selecting the first target as the scheme target, instead search for and select the first runnable target. If there are no runnables found, then select the first target.

* update docs
2020-09-29 16:44:53 +10:00
Brentley Jones
5ac96741bc
Improved Application Extension scheme generation (#932)
* Default extensions to launchAutomaticallySubstyle "2"

* Don't use debugger launcher with extensions

Xcode schemes don't use the LLDB launcher, even when debugging is enabled.

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2020-09-06 15:40:32 +10:00
Samuel Giddins
c8b24acbdd
Allow creating intermediary groups outside of the project directory (#892) 2020-09-02 14:45:27 -07:00
Brentley Jones
bc51191a3a
Add support for App Clips (#909)
* Add support for App Clips

Embeds App Clips into the containing app when they are a dependency.

* Patch #909 to not fail CI (#917)

Co-authored-by: Dan Fleming <dflems@spotify.com>
2020-08-16 20:02:56 +10:00
Bartosz Polaczyk
1d2a28490f
Add custom lldinit for a scheme (#929)
* Add customLLDBInit

* Add changelog info to a valid bucket

* Update PR number

* Add fixture tests

Co-authored-by: Bartosz Polaczyk <bartoszp@spotify.com>
2020-08-12 16:13:47 +10:00
Kiran Thorat
691ca93677
Fixes for embedding SDK dependencies. (#922) 2020-08-06 09:13:13 +10:00
Cody Vandermyn
727a648623
Add ability to skip the entire test target (#916)
* add ability to skip the entire test target

* when skipped is true, add it to the toJSONValue dictionary

* Add changelog entry
2020-08-05 20:05:23 +10:00
Kiran Thorat
142f84429d
Fixed issue of optionally excluding swift package from target dependencies. (#920)
fixed typo and updated changelog for fixes
2020-08-04 16:09:31 +10:00
Yonas Kolb
20a99e5018
Add FileTypes for cross project file options (#914)
* move BuildPhase

* add fileTypes

* update changelog
2020-08-04 09:14:32 +10:00
Muhammad Muizzsuddin
d68900e313
Fix app extension scheme generation (#899)
* Fix XCScheme generation for Extension

* Use schemeTarget
2020-07-26 22:17:32 +10:00
Jared Sorge
331c3da0ef
Add Target option for copying frameworks when installing (#912)
* Add copy files on install option

* Add documentation

* Add tests

* Add to the target’s JSON if true

* Add changelog entry

* Add test for outputted pbxproj file
2020-07-26 22:15:42 +10:00
Khaos Tian
37e1f72531
Treat all directories with known UTI as file wrapper (#896)
* Only allow folder with unknown UTI

* Update fixture

* Use fileGroups instead of fixtures.

* Change log

* Add to the right place

* Rename title
2020-06-25 18:39:04 +10:00
Yonas Kolb
7da953a488 swift format 2020-06-17 18:12:34 +10:00
Yonas Kolb
0964a7ed30 Revert "Add staticBinary linkType for Carthage dependency (#847)"
This reverts commit d88d385757.

# Conflicts:
#	CHANGELOG.md
#	Sources/XcodeGenKit/PBXProjGenerator.swift
#	Tests/XcodeGenKitTests/ProjectGeneratorTests.swift
2020-06-17 17:56:02 +10:00
Yonas Kolb
179eec45d9 rename executableName to executable 2020-06-17 17:23:17 +10:00
Jerry Marino
1e3f93a859
Improve target dependency not found fatalError (#883)
It's pretty tricky to find out how to fix it otherwise. Hitting this
often when using XcodeGen with XCHammer for Bazel Xcode projects.
XCHammer simply pulls in transitive targets, but users can filter out a
subset of targets based on paths. Both XCHammer and XcodeGen Yaml give
users flexibility for specify what targets are in their Xcode project,
so it's useful to give them a better validation error if they create
one.
2020-06-09 15:55:04 +10:00
Joseph Colicchio
1f95a41b85
Compile xcmappingmodel files instead of copying them (#834)
* Compile xcmappingmodel files instead of copying them

* Add test for xcmappingmodel

* Update changelog

* Fix xcmappingmodel reference to avoid folder containing xml

* Fix xcmappingmodel contents to avoid test failure

* Tweak yaml to fix compiler flag on xcmappingmodel

avoid `-Werror` added to xcmappingmodel compiler flags, which was preventing compilation
2020-06-04 15:22:33 +10:00
Joeri Djojosoeparto
7ec2f7f8e3
Feature: Ability to set executable to Ask to Launch (#871) 2020-05-29 07:53:48 -05:00
Igor Ranieri Elland
463db0616d
Added ability to name executable target in schemes Run configuration. (#869) 2020-05-28 07:50:52 -05:00
Igor Ranieri Elland
92aaebb9d5
Added ability to name the executable target in schemes. (#866)
```
schemes:
  MyScheme:
    build:
      executable: MyExecutable
      targets:
      ...
```

Co-authored-by: Igor Ranieri Elland <igor.ranieri@de.bosch.com>
2020-05-20 08:05:03 -05:00