enhancementhelp wanted
説明
I want to make a suggestion, but looking for comments before working on an implementation, I couldn't find any existing discussion of this.
The idea is to be able to specify the build platforms in the Cartfile, for each dependency. I see two main reasons for doing so:
- When you first get a project, hit
carthage bootstrap, by default it does builds for 4 platforms, but in most cases, you are only interested in one of these. If it was specified in theCartfileyou wouldn't have to know which platforms to include using--platformsat bootstrap. - When you have mixed project, e.g. iOS app with watchOS embedded, you often have some dependencies that only need to be built for iOS, so that only need to be built for watchOS, and some for both. When using
--platformsall your deps get built for iOS and watchOS.
It would require extending the Cartfile syntax, something like:
github "jdhealy/PrettyColors" ~> 5.0, platforms: iOS, watchOS
github "ReactiveCocoa/ReactiveSwift" ~> 3.0, platforms: iOS
Most likely the --platforms argument would override this, and build for everything specified
I think this can improve build times quite significantly.