Commit Graph

63 Commits

Author SHA1 Message Date
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
Joseph Colicchio 05ea968f70 Bugfix/StoreKitConfiguration BuildPhase (#1026)
* Copy storekit to bundle resources by default

* Fix tests

* Update changelog
2021-02-24 08:33:54 +11:00
Samuel Giddins c8b24acbdd Allow creating intermediary groups outside of the project directory (#892) 2020-09-02 14:45:27 -07: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
Yonas Kolb 7da953a488 swift format 2020-06-17 18:12:34 +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
Jeff Lett aaae84f883 Feature/catch xcode test failures (#851)
* Adding pipefail to CI tests so xcpretty doesn't eat test failures

* Resolving test issues
2020-04-29 08:34:25 -05:00
Sam Kirchmeier aeb65969d4 Automatically include bundles in the Copy Bundle Resources build phase (#838) 2020-04-22 07:59:43 -05:00
Asif 400c19ee9a Bugfix: Consider folders with dot in it when generating projects (#826)
* Bug fix in SourceGenerator

Folders which would have a dot in it, would be added to Copy Bundle Resources even though it contained swift files. This commit, updates the if checks to check if the extension is not of type lproj or xcassets or bundle. This would let Xcodegen handle paths with dots in it

* Refactor SourceGenerator.swift getGroupSources function

* Add FolderWithDot2.0 to TestProject/App_iOS

* Update TestProject fixture with SwiftFileInDotPath and FolderWithDot2.0 changes

* Update test to assert bundles are included in resources

* Remove intentDefinition from whitelistedDirectoryExtensions because it's not a directory, it's always a file so the check is not required
2020-04-09 07:47:54 -05:00
Christopher Rogers 5966e294e7 Stabilize sorting of groups with duplicate names/paths (#671)
* Stabilize sorting of groups with duplicate names/paths

For example, previously a group with (name: nil, path: "Sources") would be considered equal to (name: "Sources", path: "../Sources"), even though they are distinct groups.

* Remove Comparable conformance from PBXFileElement

...as it isn't compatible with its Equatable conformance.

Renamed localizedStandardCompare to reflect the fact that PBXFileElement no longer has an inherent order.

* Update changelog
2020-02-02 09:46:17 +11:00
sipao 3a9131a21a Add support On Demand Resources (#753)
* added on-demand-resources setting to project.yml

* update documents

* Apply suggestions from code review

fixed docs

Co-Authored-By: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Make it possible to resourceTags convert to json

* Use sorted() instead of Array initializer

* Avoid merge assetTags if it is empty

* Changed access to resourceTags to inline

* Don't add resourceTags other than chosenBuildPhase is .resources

* update CHANGELOG.md

* update spec loading test

* add a new "generates resource tags" test case

* add resourceTags in Test Fixture and update

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2020-01-21 08:47:31 +11:00
yonaskolb 66ba10c3c6 print group hierarchy on source generator test failure 2019-11-20 22:18:32 +11:00
Romuald CARI 0df37029cc Fix TargetSource group behavior
When targeting a file, a folder should not be created for its directory,
only the file should appear in the specified custom group.
Moreover, if the custom groups contains actual filesystem folders, they
should map to these.
2019-11-19 15:56:24 -05:00
Romuald CARI de9c15ea1d Fix @sroebert PR based on @yonaskolb comments 2019-11-19 15:56:23 -05:00
Steven Roebert 15e615300e Added new group parameter to target sources, allowing to add them to a custom parent group (resolving #478) 2019-11-19 15:56:23 -05:00
Kohki Miki cad36baa6d Update SourceGeneratorTests.swift 2019-11-19 04:38:05 +09:00
giginet 5e9a2a9651 Add test case with buildPhase 2019-11-19 04:34:28 +09:00
giginet e24fa881da Tweak 2019-11-19 03:35:51 +09:00
giginet c5e9f07a53 Add tests to add intentdefinition to build source phases 2019-11-19 03:00:08 +09:00
yonaskolb 865ad156b2 use custom unwrap function 2019-11-10 12:18:04 +11:00
yonaskolb 66569d3670 use XCTUnwrap 2019-11-10 12:09:37 +11:00
yonaskolb 0e4e08bfc4 run swift format for Swift 5.1 2019-11-10 11:56:23 +11:00
Kohki Miki 03076f40eb Support Static Frameworks for Carthage dependencies (#688) 2019-11-07 11:03:26 -06:00
yonaskolb d0d509c1a5 swiftformat 2019-10-27 22:37:41 +11:00
Nikita Ivanchikov 974bf8ac5f Add source generator tests 2019-10-08 01:40:56 +03:00
Brian Clymer e4204e51ee Tweak an includes test. 2019-09-01 15:33:15 -05:00
Brian Clymer 582193e482 Merge branch 'master' into BC-IncludesOnly 2019-09-01 15:23:24 -05:00
yonaskolb d921d14259 make format_code 2019-09-01 22:02:53 +10:00
Brian Clymer fbac8af327 Include path even if it's only a relative of the included file. 2019-08-28 15:48:47 -05:00
Brian Clymer f918bf54ea Add support for explicit includes on sources.
They are overridden by excludes.
2019-08-28 14:22:35 -05:00
Brian Clymer bcdbad4a10 Add recursive glob support. 2019-08-28 13:39:05 -05:00
Keith Smiley acb56f8866 Ignore files with orig extension
This is useful for multi-developer projects where you don't want to
delete these files for everyone, since they might actually want them,
but they still aren't useful to show in Xcode.

Fixes https://github.com/yonaskolb/XcodeGen/issues/310
2019-08-24 11:57:10 -07:00
yonaskolb 401df4042a fix swift 5.1 warnings 2019-06-26 17:02:42 +10:00
yonaskolb 745be5fc1d update import name 2019-06-26 16:49:10 +10:00
min efb5951d13 Allow more flexibility by accepting an [String] for attributes 2019-05-11 08:36:24 -07:00
min 60a0f64416 Add support for no_codegen settings ATTRIBUTE 2019-05-07 20:42:44 -07:00
Steven Roebert d12bd0a426 Added unit test for testing the flattening of relative paths #(550) 2019-04-07 13:05:01 +02:00
yonaskolb c73bad3312 Fix optional file sources 2019-04-04 23:32:55 +11:00
yonaskolb 16bc081944 update to xcodeproj 6.7 2019-04-01 20:15:38 +11:00
yonaskolb bcbc83dd75 rename includeCarthageRelatedDependencies to findCarthageFrameworks and includeRelated to findFrameworks 2019-03-24 22:59:29 +11:00
Yonas Kolb d4797c3ff6 Merge pull request #524 from elliottwilliams/emw_relative_paths
Compute relative paths to support sources outside a spec's directory
2019-02-27 08:12:51 +11:00
Rogerio de Paula Assis 18f52ab098 Introduces ability to include Carthage related dependencies when creating a project configuration file 2019-02-22 21:29:56 -05:00
Elliott Williams 3b15144033 Determine relative path for top-level groups 2019-02-21 11:46:23 -08:00
Yonas Kolb fb3f80d6af run swiftformat 2019-01-28 22:20:01 +11:00
Yonas Kolb 8d06dbe8ca add createIntermediateGroups to TargetSource 2019-01-28 21:52:29 +11:00
Kryštof Matěj ec60901ff7 Fix carhage dependency resolving 2019-01-25 07:40:12 +01:00
Beniamin Sarkisian b24753e233 Updated tests 2019-01-08 17:08:58 +03:00
Beniamin Sarkisian f094f4073f Updated tests 2019-01-08 17:01:25 +03:00
David W. Berry 7e2c870762 Add mlmodel to compiled file extensions (#457) 2018-12-13 13:03:46 -06:00
Yonas Kolb f022d1edc9 add .intentdefinition to sources by default 2018-11-22 21:55:53 +11:00