The Xcode Plugin generate files that are used by the Xcode IDE to open Gradle projects into Xcode (File - Open…​). The generated Xcode project delegates build actions to Gradle.

What exactly the xcode plugin generates depends on which other plugins are used:

Table 1. Xcode Plugin behavior
Plugin Description


Generates minimal solution file.

C++ Application

Adds a target representing the C++ application to the project file.

C++ Library

Adds a target for each specified linkage representing the shared and/or static library to the project file.


Example 1. Applying the Xcode Plugin
plugins {
    id 'xcode'
plugins {


The Xcode Plugin adds a number of tasks to your project. The main tasks that you will use are the xcode, cleanXcode and openXcode tasks.

The following diagram shows the relationships between tasks added by this plugin.

xcode task graph
Figure 1. Xcode Plugin default task graph

Lifecycle Tasks


Depends on: projectNameXcodeWorkspace and all xcodeProject tasks

Generates all Xcode configuration files.


Depends on: all Xcode project and workspace file clean tasks

Removes all Xcode configuration files.

openXcode - Task

Depends on: xcode

Open the Xcode workspace inside the IDE.

IDE Workspace Tasks

xcodeWorkspaceWorkspaceSettings - GenerateWorkspaceSettingsFileTask

Generates the projectName.xcworkspace file. This task is only available on the root project.

xcodeWorkspace - GenerateXcodeProjectFileTask

Depends on: xcodeWorkspaceWorkspaceSettings

Generates the projectName.xcworkspace file. This task is only available on the root project.

IDE Project Tasks

Both the C++ Application Plugin and C++ Library Plugin introduce the same tasks for generating Xcode projects to be included in an Xcode workspace.


Generates the projectName.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings file.


Generates the projectName.xcodeproj/xcshareddata/xcschemes/ProjectName.xcscheme file.


Depends on: xcodeProjectWorkspaceSettings and xcodeScheme (if buildable binary present)

Generates the projectName.xcodeproj/project.pbxproj file.


The Xcode Plugin doesn’t allows any customization of the generated files.