Commit Graph

629 Commits

Author SHA1 Message Date
ryohey ce27af0647 Refactor variant group generation
- Add getVariantGroup() in the same manner as getFileReference()
2017-11-03 10:51:48 +09:00
ryohey e24c0e29c7 Refactor localized file references generation
- Use getFileReference() to generate localized file references
- Add name parameter to getFileReference
2017-11-03 10:35:54 +09:00
Yonas Kolb b166634322 Merge pull request #121 from bkase/support-compiler-flags
Support CompilerFlags in Sources
2017-11-03 01:03:12 +01:00
Brandon Kase 4138032711 Interpret .c files as sources 2017-11-02 13:49:06 -07:00
Brandon Kase 6b17b76435 Support CompilerFlags in Sources
Added support for compilerFlags in source list. If any source file
metadata (like compilerFlags) is attached to a directory the metadata
propagates downwards to all children recursively until the files are
reached.

Files are now processed in the same way as directories in `getSources`
this depends on #108 to not over-eagerly cache groups. The `source` is
propagated as metadata down all the way (thanks @yonaskolb)

Fixtures and unit tests are updated as well.
2017-11-02 13:47:26 -07:00
Brandon Kase e48045da9e Optionally make intermediate filler groups
This commit adds a new option `createIntermediateGroups` that defaults
to false. When it is false, the behavior of XcodeGen is the same as
before. When it is true, we make intermediate groups recursively until
we reach the basePath. In practice that means if you've chosen
`Platform/PINFoundation/Sources` as one of your sourcePaths, you get a
top-level group of `Platform` and under that `PINFoundation` and under
that `Sources`. This is instead of the default behavior of just making
`Sources` a top-level group (which is confusing when your directory is
called `Sources` for example).
2017-11-01 18:02:31 -07:00
Yonas Kolb b274ae6f63 swiftformat 2017-11-02 00:25:13 +01:00
Yonas Kolb e4d42cb6eb getSources tweak 2017-11-02 00:25:13 +01:00
Eric Miller a27d65b7d0 Add .mm file as a source type 2017-11-01 17:35:31 -05:00
Brandon Kase 4a54fe6d2a Support file sources
The `sources` key of the project spec only supported directories and not
files. Now it supports both!

This commit introduces a `getSourceFiles` overload that doesn't explicitly
invoke `path.children()`, but instead accepts `children` as a parameter.
This allows us to invoke the `children` overload of getSourceFiles with just
the files we want to include (determined by specifying the sources).

Now for sourcePaths that are files, we group by parents before invoking
getSourceFiles in order to reuse the same groups.
2017-11-01 11:37:19 -07:00
Yonas Kolb ec576e31c5 Merge pull request #118 from ryohey/fix-copy-headers
Don't add unnecessary headers build phase
2017-10-31 21:15:34 +01:00
ryohey f67609f97e Don't add unnecessary headers build phase 2017-11-01 01:40:21 +09:00
Yonas Kolb cda8931e30 refactor source generating 2017-10-31 17:33:35 +01:00
Yonas Kolb 92c2e5c5b5 run format-code.sh 2017-10-29 22:27:05 +01:00
Yonas Kolb f8b4b5792e move and rename files 2017-10-29 22:15:02 +01:00
Yonas Kolb 9a41bb9ab6 minor refactoring of spec validation 2017-10-29 20:32:36 +01:00
toshi0383 9c603af5e9 Refactor remove value logic 2017-10-29 08:41:10 +09:00
toshi0383 cd910fe714 remove values before loading buildSettings from user spec 2017-10-29 08:32:28 +09:00
toshi0383 f68f96e249 Remove basePath parameter for spec 2017-10-29 08:27:42 +09:00
toshi0383 28b6e2cfbf Merge remote-tracking branch 'upstream/master' into ts-no-overwriting-xcconfig-value 2017-10-29 07:52:04 +09:00
Yonas Kolb e14a85fd69 Merge pull request #113 from yonaskolb/xcproj_1.2
Update to xcproj 1.2
2017-10-28 20:11:18 +02:00
Yonas Kolb a4471e839e update to xcproj 1.2 2017-10-28 20:01:01 +02:00
Yonas Kolb ebb945ede2 add spec validation that a spec has debug and release configs when generating a target scheme 2017-10-26 23:52:18 +02:00
Yonas Kolb e44868530f Merge pull request #111 from yonaskolb/config_reference
Partial config matching
2017-10-26 23:32:10 +02:00
Yonas Kolb 08079c914e make Settings.configs case insensitive 2017-10-26 21:53:16 +02:00
Yonas Kolb 11abfb0ae2 apply partial matching to Settings.configs 2017-10-26 21:50:45 +02:00
Yonas Kolb 5c65ef13b7 add setting config reference linting 2017-10-26 19:40:46 +02:00
Keith Smiley 08de6077d9 Add option for not linking dependencies
This adds a new attribute to Dependency that allows consumers to choose
to not link a dependency. This is useful for if you have this dependency
tree with static libraries:

App -> A -> Shared
App -> B -> Shared

Where A and B both share a static library dependency, that is finally
linked into App. If Shared is added to the link phase of A and B, you
end up with duplicate symbols during the link phase. With this change
consumers could set link: False on A and B's dependency on Shared, this
way Shared will get build before A and B, but not linked.
2017-10-25 15:55:49 -07:00
Yonas Kolb 8e95044d55 fix carthage file references from being duplicated 2017-10-25 21:05:53 +02:00
Yonas Kolb 779397ec8d move basePath into ProjectSpec 2017-10-24 21:30:06 +02:00
Yonas Kolb 174ca9b385 Merge pull request #101 from yonaskolb/setting_preset_option
Add settingPresets option
2017-10-23 12:59:26 +01:00
ryohey 24175c3411 fix duplicate file reference 2017-10-23 11:49:11 +09:00
toshi0383 44b2710846 Move logic into spec.get*BuildSettings 2017-10-23 07:47:30 +09:00
toshi0383 9443dd2686 Merge remote-tracking branch 'upstream/master' into ts-no-overwriting-xcconfig-value 2017-10-23 06:56:59 +09:00
Yonas Kolb 0204f27c82 rename Options.applySettingPresets to Options.settingPresets 2017-10-22 20:37:03 +01:00
Yonas Kolb 20f7797df7 add applySettingPresets option 2017-10-22 19:41:54 +01:00
Yonas Kolb 6a9de2208a don't apply base project settings if config doesn't have a type 2017-10-20 12:24:52 +01:00
Yonas Kolb c244e31676 Merge branch 'master' into ks/link-dependencies 2017-10-19 00:13:43 +02:00
Yonas Kolb 689ac58f71 Merge pull request #95 from keith/ks/copy-resources
Allow copying of resource files from targets
2017-10-19 00:10:53 +02:00
Yonas Kolb 22b1ba9045 Merge pull request #94 from keith/ks/resource-files
Exclude more file types from resources
2017-10-18 18:23:37 +02:00
Keith Smiley 5c90d6189c Don't copy libraries
These should only be linked. If we add a library to the project here,
Xcode will remove it next time it touches the project
2017-10-18 08:50:55 -07:00
Keith Smiley 739b9f36f7 Link framework and library dependencies 2017-10-18 08:50:54 -07:00
Keith Smiley d24df8677c Allow copying of resource files from targets
Previously we were assuming that all targets that were not app
extensions should be added to the copy frameworks build phase, even
though we didn't have any guarantee they were actually frameworks. This
updates that to ensure that things copied in the copy frameworks phase
are actually frameworks, and then falls back to the resources phase
instead. This fixes the ability to embed bundle targets, and copy them
as resources.
2017-10-18 08:44:14 -07:00
Keith Smiley 3ab7071703 Exclude more file types from resources
Entitlements files, gpx files, and explicit lproj directories should
never be included in a target's copy resources phase.

Ideally this would also include files with the plist extension, but
there are some outliers such as AppIntentVocabulary.plist.
2017-10-16 21:33:23 -07:00
Keith Smiley 5c39cf4e14 Add support for copying Watch apps
Watch apps aren't copied to the same place as other targets, they need
their own copy files phase with a custom path just for watch targets.
2017-10-16 21:31:27 -07:00
ryohey 859609158c fix localized sources 2017-10-16 11:58:21 +09:00
ryohey 2f2c89e0c1 fix localisation variant groups 2017-10-16 11:51:28 +09:00
Yonas Kolb fd2bf39b28 Merge pull request #82 from toshi0383/ts-always-embed-and-link-frameworks-for-macos
Always embed and link frameworks for macOS
2017-10-13 23:12:36 +02:00
Eric Miller 5d9c3a9ab8 Update to xcproj 0.4.0 2017-10-10 13:39:18 -05:00
mironal f6d6f17f1b sort carthage dependencies 2017-10-05 10:53:08 +09:00