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:
Plugin | Description |
---|---|
None |
Generates minimal solution file. |
Adds a target representing the C++ application to the project file. |
|
Adds a target for each specified linkage representing the shared and/or static library to the project file. |
|
Adds a target representing the Swift application to the project file. |
|
Adds a target for each specified linkage representing the shared and/or static library to the project file. |
|
Adds a target representing the XCTest bundle to the project file. |
Usage
plugins {
xcode
}
plugins {
id 'xcode'
}
Tasks
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.
Lifecycle Tasks
xcode
— Task-
Depends on:
projectNameXcodeWorkspace
and allxcodeProject
tasksGenerates all Xcode configuration files.
cleanXcode
— Delete-
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.
xcodeProjectWorkspaceSettings
— GenerateWorkspaceSettingsFileTask-
Generates the
projectName.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
file. xcodeScheme
— GenerateSchemeFileTask-
Generates the
projectName.xcodeproj/xcshareddata/xcschemes/ProjectName.xcscheme
file. xcodeProject
— GenerateXcodeProjectFileTask-
Depends on:
xcodeProjectWorkspaceSettings
andxcodeScheme
(if buildable binary present)Generates the
projectName.xcodeproj/project.pbxproj
file.
Configuration
The Xcode Plugin doesn’t allows any customization of the generated files.