GeezerVison is showing docs.gradle.org — Xcode
The Xcode Plugin generates 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 |
None |
Generates minimal workspace 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. |
Swift Application |
Adds a target representing the Swift application to the project file. |
Swift Library |
Adds a target for each specified linkage representing the shared and/or static library to the project file. |
XCTest |
Adds a target representing the XCTest bundle to the project file. |
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.
Figure 1. Xcode Plugin default task graph
xcode — Task
-
Depends on: projectNameXcodeWorkspace and all xcodeProject tasks
Generates 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
Opens the Xcode workspace inside the IDE.
xcodeWorkspaceWorkspaceSettings - GenerateWorkspaceSettingsFileTask
-
Generates the projectName.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings file. This task is only available on the root project.
xcodeWorkspace - GenerateXcodeWorkspaceFileTask
-
Depends on: xcodeWorkspaceWorkspaceSettings
Generates the projectName.xcworkspace file. This task is only available on the root project.
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 and xcodeScheme (if buildable binary present)
Generates the projectName.xcodeproj/project.pbxproj file.
The Xcode Plugin doesn’t allow any customization of the generated files.