Xcode Step
An Xcode build step for running Xcode projects.
Example. Adds an Xcode build step with a scheme-based build.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
xcode {
name = "My Xcode step"
projectPath = "SampleProject.xcodeproj"
buildType = schemeBased {
scheme = "SampleProject"
outputDirectory = default()
}
}
Content copied to clipboard }
}
Example. Adds an Xcode build step with a scheme-based build with custom working directory, with custom Xcode path, output directory, build actions and additional command line parameters.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
xcode {
name = "My Xcode step"
workingDir = "project"
projectPath = "project/SampleProject.xcodeproj"
xcodePath = "path/to/Xcode"
buildType = schemeBased {
scheme = "SampleProject"
outputDirectory = custom {
path = "outputDir"
}
}
buildActions = "clean build"
runTests = true
additionalCommandLineParameters = "-quiet"
}
Content copied to clipboard }
}
Example. Adds an Xcode build step with a target-based build.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
xcode {
name = "My Xcode step"
projectPath = "SampleProject.xcodeproj"
buildType = targetBased {
target = "MyTarget"
configuration = "Debug"
platform = "macosx" // ... "iphoneos", "iphonesimulator"
sdk = "mySDK"
architecture = "myArchitecture"
}
buildActions = "clean build"
runTests = true
}
Content copied to clipboard }
}
See also
Constructors
Properties
Other command line parameters to be passed to the xcodebuild utility.
Xcode build action(s). The default actions are clean and build. A space-separated list of the following actions is supported: clean, build, test, archive, installsrc, install; the order of actions will be preserved during execution. It is not recommended changing this field unless you are sure you want to change the number or order of actions. If your project is built under Xcode 5+, setting the runTests option automatically adds the test build action to the list (unless the option is already explicitly specified in the current field).
Select either a target-based (for project) or scheme-based (for project and workspace) build. Depending on the selection, the settings will vary.
Optional collection of build step execution conditions
Build step execution mode
The path to a (.xcodeproj) project file or a (.xcworkspace) workspace file, should be relative to the checkout directory. For Xcode 3 build, only the path to the project file is supported.
Build working directory for the executable, specify it if it is different from the checkout directory.
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Validates this object and reports found errors to the provided consumer