Guidance on building iOS apps and frameworks with xcodebuild


(Peter Hood) #1

Hi,

I’m exploring the idea of using Gradle to build our iOS frameworks and app.

At first, I thought it would be straight forward by creating a custom plugin that uses Gradle’s built-in dependency management, copying those downloaded dependencies into the project directory, and executing xcodebuild to build the project. That works perfectly fine.

The problem comes in when I wanted to substitute some of the dependencies with local directories (like composite builds) and I couldn’t seem to get that working.

After exploring some more, I noticed the native plugins and thought maybe I should be building a new toolchain that uses xcodebuild - kind of like gcc - and follow that whole software model of build types, variants, etc.

I guess what I’m looking for is guidance on what would be the best approach. My requirements are:

  • Being able to build with binary dependencies
  • Being able to substitute one or more of those binary dependencies with a local directory
  • Being able to substitute one or more of those binary dependencies with a source dependency
  • Substituting ALL dependencies with source dependencies (basically forcing a build from source)

Any direction would be greatly appreciated!

Thanks,
Pete