Swift "framework" support for iOS applications

Hi All,
I saw the examples for swift build scripts here: https://github.com/gradle/native-samples. But it only contains building an executable and library. Is there support for building swift framework using gradle native? Does it support building iOS applications?

Also, do you guys plan to create a buildship like plugin for Xcode? After being a fan of gradle and it’s build scripts for 3 years, looking at the Xcode configuration files checked-in to the SCM and avoiding merge conflicts in them makes me go dizzy.

Great job with Gradle guys! Keep it up…

Hi @abishek3876

Thanks for taking a look! We’re tracking our progress on Gradle’s native related improvements on https://github.com/gradle/gradle-native.

We currently don’t have support for building Swift frameworks with Gradle, but I’ve opened an issue to keep track of your request.

Our platform support is intentionally simple right now. We only try to build for the current OS/platform, so it’s not possible to build for iOS/watchOS/tvOS yet. We have plans to expand our platform support to allow you to select/configure which platforms Gradle needs to build (broadly, 32-bit vs 64-bit and Windows/Linux/macOS), so I expect iOS/watchOS/tvOS support to be further out as we incrementally move towards that.

In all of the samples, you should be able to run gradle xcode and get a working Xcode project. Please let us know if you see something that could be improved.

Thanks again!

With regards to buildship-like plugin, Xcode plugin framework doesn’t allow for much configurability. However, the solution we went for is to delegate the building process to Gradle from the generated xcodeproj files. Those files shouldn’t be part of your SCM anymore. There is still some work to be done to support all feature in Xcode such as code coverage, but those are features we want to enable from Xcode as well as from the CLI. As Sterling pointed out, give it a try and send any feedback our way so we can improve what we already have.

Thanks for your inputs. I will try them out and come back if anything… Thanks again…