You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Existing projects may not have all their header files in a single directory, as such it may be challenging to define a single glob pattern to include all required headers. This becomes more challenging when different header types (public, private & project) are all within the same directories.
Describe the solution you'd like
Add support to specify array of paths / glob patterns for headers:
Resolves#354
### Short description 📝
Add support to specify array of paths / glob patterns for headers such as the case below:
```
Headers(public: ["Sources/A/**/*.h", "Sources/B/**/*.h"],
private: ["Sources/C/**/*.h", "Sources/D/**/*.h"],
project: "Sources/E/**/*.h")
```
### Solution 📦
Similar to the way multiple source file paths/glob patterns were implemented (#266). We can use `FileList` and `ExpressibleByStringLiteral` to expose public, private and project headers as either a String or Array of Strings. The original `FileList` used for sources was not reused as it contained `compilerFlags` which is specific to source files. A new `FileList` containing only paths/glob patterns was created for use with headers. This way `FileList` can be potentially reused elsewhere.
### Implementation 👩💻👨💻
- [X] Remove `FileList` type alias from `SourceFilesList` and references to it
- [X] Create new `FileList` without `compilerFlags`
- [X] Modify `Headers` to use the new `FileList` for public, private and project headers
- [X] Add tests to `GeneratorModelLoaderTests` to verify newly supported cases work
- [X] Create `ios_app_with_headers` fixture to support new array of strings case for headers
- [X] Write test that verifies `ios_app_with_headers` fixture targets build
### Test Plan
- Run `tuist generate` inside the `ios_app_with_headers` fixture
- Verify that the Framework1 target has the correct header files specified in the manifest
Is your feature request related to a problem? Please describe.
Existing projects may not have all their header files in a single directory, as such it may be challenging to define a single glob pattern to include all required headers. This becomes more challenging when different header types (public, private & project) are all within the same directories.
Describe the solution you'd like
Add support to specify array of paths / glob patterns for headers:
e.g.
Describe alternatives you've considered
An alternate is to move code around to group all public, private and project classes.
e.g.
Additional Context
Both
sources
andresources
have been updated to support multiple paths / glob patterns (e.g. #266) - a similar approach can be adopted here.Reference
Originally posted by @zdnk in #352 (comment)
The text was updated successfully, but these errors were encountered: