Carthage: Treat build platform as a project setting

Created on 23 Feb 2015  路  13Comments  路  Source: Carthage/Carthage

build enhancement

Most helpful comment

MERGE PLZ!!!!

All 13 comments

As mentioned in #877 I'd love a way to specify platforms in the Cartfile, something like:

platform iOS

github ...

Initially I was into this but I'm not sure it makes sense. e.g. if you have a project with cross-platform outputs, you really need a single Cartfile that does specify which platforms to build each dependency for.

An example would be an app that has iOS and tvOS versions, and the iOS version has features that are not available in tvOS - and it does this via some dependencies. You would want to build everything for iOS + tvOS, _except_ those frameworks that are only desired on iOS. A single Cartfile would not enable this so the "platforms" would need to be specified per dependency.

Otherwise, you'd have no choice but to have separate project folders and separate Cartfile even though these are just variants of the same app?

If implemented, this setting belongs in Cartfile.private (as mentioned in the issue body), so it wouldn't apply transitively, but instead be a "local" project configuration. Most useful for applications.

Also useful for those of us who are only building a Mac version. It can be defaulted to all, so there would be no backward compatibility.

MERGE PLZ!!!!

This would be very great to have. With an iOS app depending on ~10 different libraries, I could save a lot of time not having to build the dependencies for AppleTV, the Apple Watch, and the Mac.

@craigotis You can already provide --platform to specify that. This is just about being able to set defaults.

It would still be very nice to see this feature implemented, is there any work done on this already?

No. This is waiting on a more flexible format for Cartfiles. But we're also focused on cleaning up and improving existing code/functionality.

Is there an issue of the discussion about a more flexible Cartfile so we can keep staying updated?

@jspahrsummers You keep mentioning this:

You can already provide --platform to specify that.

But there is no way to default your platform so that you don't have to type it in locally if you're building. I think that's what people are asking for.

Edit: Actually Punic solves this pretty well for now and interoperates with Carthage.

Being able to specify the platform in some kind of form in the cartfile is really important, for example we use different frameworks for iOS and tvOS and now we have extra frameworks being build on both platforms.

Support Configuration in Cartfile.private

In my fork CodeEagle/Carthage.

Support Punic Features

Speed up App Launching

Was this page helpful?
0 / 5 - 0 ratings