Commit Graph

3 Commits

Author SHA1 Message Date
Pedro Piñera 98ffc0b0f0 Update fixtures 2020-03-10 18:29:49 +01:00
Pedro Piñera 64a9e9fd88 Delete manifests target generation 2019-11-26 15:49:32 +01:00
Adam Khazi f84fe72181
Support Multiple Header Paths (#459)
Resolves https://github.com/tuist/tuist/issues/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  (https://github.com/tuist/tuist/pull/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
2019-07-25 13:56:40 +01:00