This is a dummy project demonstrating a possible issue in gradle-xcodePlugin.
My theory is that the plugin is not supporting running xcodebuild
for projects located in a subfolder rather than in the current directory.
Running gradle xcodebuild
works in this case:
MyApp/
|
|_ MyApp.xcodeproj
But doesn't work in this:
MyProject/
|
|_ MyApp/
|
|_ MyApp.xcodeproj
To reproduce clone the repo and run gradle xcodebuild
from its root, you should get an output similar to the one in gradle_output.txt
.
The relevant error message being:
xcodebuild: error: The directory /Users/me/path/to/repo/GradleXcodeIssueDemo does not contain an Xcode project or workspace.
Note that setting the value of projectFile
doesn't solve the issue. See this project's build.gradle
.
xcodebuild
itself has a -project
option to specify the location of the xcodeproj
folder.
The plugin should set the -project
option for xcodebuild
using the value of the projectFile
configuration, if any is set.
From what I can understand the proper place where to do it is in the build()
task action of XcodeBuildTask
.
To verify that using the -project
option works run the successful_xcodebuild
executable.