Skip makePathRelative for folder-type sources since they use sourceTree
.sourceRoot and need the full project-relative path preserved. The call
was inadvertently added for all source types in #1596 but only synced
folders (.syncedFolder) need it.
Fixes#1603
* Add explicitFolders support to syncedFolder
Adds an `explicitFolders` property to `TargetSource` that is expanded from Glob patterns and passed through to `PBXFileSystemSynchronizedRootGroup`.
* Fix syncedFolder sources ignoring createIntermediateGroups
When createIntermediateGroups was enabled and a syncedFolder source had a
multi-component path (e.g. SyncedParent/SyncedChild), two things went wrong:
1. The synced folder was unconditionally added to rootGroups, causing it
to appear both at the project root and inside the correct intermediate
parent group.
2. The synced folder kept its full project-relative path instead of being
made relative to its parent group, so Xcode concatenated them into a
wrong path (e.g. SyncedParent/SyncedParent/SyncedChild).
* Enhance PBXFileElement to recognize synced folders as groups that can be sorted
* Fix membership exceptions for nested synced folder with intermediate groups
* Update Changelog
* Handle membership exceptions for synchronized root groups
Adds logic to detect and register membership exceptions for PBXFileSystemSynchronizedRootGroup objects, specifically excluding Info.plist files from group membership when necessary. Also ensures resources build phase is added if synchronized root groups are present.
* Refactor synced folder membership exceptions with glob support
Extract configureMembershipExceptions into its own method, use Set for
dedup, resolve excludes via glob expansion, and add a no-op test case.
Incorporates glob support and tests from macguru@baf1108.
* Update UUID
* Comment out excludes in project.yml
Comment out excludes for ExcludedFile.swift due to CI issue.
* Clean up project.pbxproj by removing exception set
Removed PBXFileSystemSynchronizedBuildFileExceptionSet section and its references.
* Remove comment
* Update SourceGeneratorTests.swift
* Update project.pbxproj
* Retrigger CI
* Add info.plist exclusion
* 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>
* 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
* Add support for DocC
DocC "files" are actually folders `.docc` appended to the name, but Xcode 13 treats them differently. Therefore, we need to exclude them from the normal BuildPhase.
Resolves#1089
* Add tests for DocC
Expanded an existing test to include .docc support.
Also added a .docc catalog to the Test Project.
* Update changelog.md
* Update changelog.md to get the correct PR Link
* 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
* 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
* 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
* 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
* 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>
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.
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