Commit Graph

155 Commits

Author SHA1 Message Date
Yonas Kolb c32aa4cc94 Synced folders (#1541)
* update xcodeproj to 8.27.7

* add syncedFolder source type

* drop xcode 15 support

* Rely on fileReference instead of adding new synchronizedRootGroup (#1557)

* fix: don't include untracked children in cache

---------

Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>
2025-07-17 15:15:43 +10:00
Steven Sheldon b1e03f0f46 Fix checking optional group existence relative to the working dir (#1529) 2025-02-17 16:01:59 +11:00
Hilton Campbell 632ca2d419 Enable adding local Swift packages to the project root (#1413)
* Enable adding local Swift packages to the project root

* Update CHANGELOG.md
2024-04-07 23:18:24 +10:00
Jaap Manenschijn 54139090a3 Make sure to create parent group structure for local packages (#1417)
* Make sure to create parent group structure for local packages

* Remove redundant localPackageGroup variable

---------

Co-authored-by: Jaap Manenschijn <jaap.maneschijn@rabobank.nl>
2024-02-14 20:18:16 +11:00
nicolasbosi95 2881fcc8fb Support for Strings Catalogs (Xcode 15) (#1421)
* Support for xcode 15 string catalogs

* Add sample string catalog to Test Fixture and basic test to check that asset catalogs are added in the resources build phase

* Restore unintended changes

* Update Pull Request number for 'Support for Strings Catalogs' in changelog

* Update fixture yml generator

* Detect knownRegions based on locales in string catalogs
2024-02-14 20:07:04 +11:00
Giovanni Amati 97d36fd1d2 Support for multiple deployment targets with xcode 14 (#1336)
* platformFilters on Dependecies

* platformFilters on sources

* fixed current unit tests

* renamed enum to SupportedPlatforms

* supportedPlatforms field for target

* errors

* renamed errors

* inferPlatformFiltersByPath flag

* changed priority to generate filter

* fixed parsing

* fixed init

* unit test supportedPlatforms

* unit tests for errors

* fixing build settings and unit tests

* added new settingsPresets

* new check errors and unit tests

* case insensitive match

* fixed skipping cross platform target

* json decode

* unit tests inferPlatformFiltersByPath and platformFilters for sources

* mocked files

* fixing unit tests

* first test on dependecies

* unit tests completed

* fixed unit tests

* changelog

* doc changes

* doc changes

* doc changes

* doc changes

* doc changes

* doc changes

* doc changes

* doc changes

* fixed doc

* fixed unti tests style

* fixed regex

* fixed doc

* addressing comments

* Added TestProject, moved unit tests resources in another folder

* Raising error if platform is an array

* unit test on new error

* fixed error enum

* Integrated in TestProject

* committed TestProject

* unit test error

* fixing spm deps in test project

* pushed testProject

* pushed testProject

* pushed testProject fix

* comment on isResolved property

* renameing supportedPlatforms to supportedDestinations

* renameing supportedPlatforms to supportedDestinations

* renameing test app

* checked out old file

* fixing test app

* working on auto baseSDK

* fixed deploymentTarget

* renamed errors

* fixed presets

* remamed index to priority

* small comments

* removed isResolved in target and fixed error check

* added unit tests

* fixed doc

* fixed doc

* fixed doc

* fixed doc

* fixed test app

* add visionOS and more error check and testing

* fixed supported destinations priority and tests

* fixed doc

* solved conflicts

* fixed conflicts

* renamed everything

---------

Co-authored-by: Giovanni Amati <giovanni.amati@sky.uk>
2023-10-31 20:55:38 +11:00
Shaun Harrison 3a7e75f1fb Fix issue with includes not working when no matches are found (#1337)
* Fix issue where an includes pattern without matches prevented includes from working

* Add new test to handle includes with no matches
2023-08-17 13:58:50 +10:00
Hesham Salman 366981ba2e Support for swiftcrossimport folders (#1317)
* Naive support for swiftcrossimport

* Update SourceGenerator.swift

* Add changelog entry

* Update CHANGELOG.md

* Add test fixture

* Check-in generated diffs
2023-01-25 11:36:25 +11:00
Alvar Hansen 17e7b03278 Run target source pattern matching in parallel (#1197)
As this transform closure does not access anything outside of its
closure and does not mutate any singletons, then it seems to be safe
to run this mapping in parallel.
2022-03-31 16:16:31 +11:00
John Connolly be0c3c3926 Added ability to use custom location for local Swift packages (#1175)
* Added xcodePath functionality

* Added xcodePath functionality

* Renamed Xcode path to group

* Updated change log and added fixture tests
2022-03-25 11:26:06 +11:00
Paul Taykalo 10fb43137b Speed up search by using parallel Glob and Binary Search for including files checks (#1122)
* Use binary searchi for Checking if path is included in included files

* Do not run glob in parallel on Linux systems
2021-10-08 09:20:19 +11: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
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
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
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
Khaos Tian 474d8f6907 Bugfix: Ensure folder and wrapper directories are correctly set on generated project (#862)
Check for UTI type instead of hardcoded extensions.
2020-05-18 12:21:34 -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
freddi(Yuki Aki) a077f2da88 Update Sources/XcodeGenKit/SourceGenerator.swift
Co-Authored-By: Yonas Kolb <yonaskolb@users.noreply.github.com>
2020-03-18 17:13:29 +09:00
freddi fd267bf503 Fixed code making absolutePath at creating local package 2020-03-05 19:46:26 +09:00
freddi 83b44b93aa Reverted not necessary change 2020-03-05 19:37:05 +09:00
freddi 7a0bd7c13c Improved PBXFileReference name at localPackages 2020-03-05 19:04:55 +09:00
freddi d8bf945ca2 Fixed issue on localPackage when specified as absolute path and when using -p 2020-03-05 09:50:45 +09: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 a6493cf3fd fix typo 2019-11-20 22:36:49 +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
giginet c5e9f07a53 Add tests to add intentdefinition to build source phases 2019-11-19 03:00:08 +09:00
giginet e1f520c358 Merge remote-tracking branch 'origin/master' into intent-definitions 2019-11-19 02:51:17 +09:00
yonaskolb 0e4e08bfc4 run swift format for Swift 5.1 2019-11-10 11:56:23 +11:00
giginet b1b216b1b5 Use VariantGroup 2019-11-08 04:02:26 +09:00
giginet ae75bcb2cb Localized 2019-11-08 02:52:50 +09:00
giginet decaa9d080 Generate suitable source files for localized file reference 2019-11-08 02:12:10 +09:00
yonaskolb 518d8e578b restructure test targets 2019-10-27 23:15:12 +11:00
yonaskolb d0d509c1a5 swiftformat 2019-10-27 22:37:41 +11:00
giginet e63fe6be6f Add resolveGroupPath 2019-10-16 05:57:39 +09:00
Kohki Miki 62a26b0a17 Merge branch 'master' into project-path 2019-10-09 16:36:42 +09:00
giginet 7db2d2c526 Rename to projectDirectory 2019-10-08 22:52:51 +09:00
giginet 6a4320612a Refactor 2019-10-08 22:48:42 +09:00
giginet f9b42c2d4f Resolve relativePath 2019-10-08 22:48:42 +09:00
giginet 90b018ad28 Passing relative path 2019-10-08 22:48:42 +09:00
giginet 44c7a0cae2 Pass projectDestinationDirectory 2019-10-08 22:48:42 +09:00
giginet 2c60f5effa Use relativePath for group 2019-10-08 22:48:42 +09:00
Nikita Ivanchikov 18089e3306 Fix some localized resources not being included into project groups 2019-10-08 00:35:41 +03:00
Qusic 9ea7ed11e3 Add .rcproject path to sources build phase
.rcproject directories are projects of Reality Composer app bundled in Xcode 11 or later.
2019-10-02 13:00:39 +08:00
yonaskolb 8e48c7b07f put local packages into a Packages group and add options.localPackagesGroup 2019-09-27 22:49:05 +10:00