Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for projectFile in subdirectory #345

Merged
merged 3 commits into from Mar 22, 2017

Conversation

phatblat
Copy link
Contributor

Currently, the build fails with a message like the following if the *.xcodeproj file is not in the same directory as the build.gradle file:

xcodebuild: error: The directory /Users/me/path/to/repo/GradleXcodeIssueDemo does not contain an Xcode project or workspace.

This PR adds support for this by adding a -project parameter to the xcodebuild command using the projectFile property.

This change can be validated in the ben/fixes branch of my fork of the example project

resolves #287

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 70.984% when pulling f3d887e on phatblat:ben/project-in-subdir into a86b9e7 on openbakery:develop.

@renep renep merged commit 22b12d8 into openbakery:develop Mar 22, 2017
@renep
Copy link
Contributor

renep commented Mar 22, 2017

This does not work :-(

At my Test-Projects I'll get:

14:57:26.673 :xcodebuild FAILED
14:57:26.680 
14:57:26.680 FAILURE: Build failed with an exception.
14:57:26.681 
14:57:26.681 * What went wrong:
14:57:26.681 Execution failed for task ':xcodebuild'.
14:57:26.681 > Command failed to run (exit code 64): '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -scheme SwiftExample -project /Users/groundskeeper/Go/pipelines/GXP-Example-ios-Swift-Continuous/example/iOS/SwiftExample/SwiftExample.xcodeproj -workspace SwiftExample.xcworkspace -configuration Debug CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO -derivedDataPath /Users/groundskeeper/Go/pipelines/GXP-Example-ios-Swift-Continuous/example/iOS/SwiftExample/build/derivedData DSTROOT=/Users/groundskeeper/Go/pipelines/GXP-Example-ios-Swift-Continuous/example/iOS/SwiftExample/build/dst OBJROOT=/Users/groundskeeper/Go/pipelines/GXP-Example-ios-Swift-Continuous/example/iOS/SwiftExample/build/obj SYMROOT=/Users/groundskeeper/Go/pipelines/GXP-Example-ios-Swift-Continuous/example/iOS/SwiftExample/build/sym SHARED_PRECOMPS_DIR=/Users/groundskeeper/Go/pipelines/GXP-Example-ios-Swift-Continuous/example/iOS/SwiftExample/build/shared -destination platform=iOS Simulator,id=4E839F12-B70E-4973-AC91-231836EF9045'
14:57:26.681   Tail of output:
14:57:26.681   xcodebuild: error: You cannot specify both an Xcode project and a workspace.

@phatblat
Copy link
Contributor Author

Ah, there needs to be some logic around when to use projectFile vs workspace.

@phatblat phatblat deleted the ben/project-in-subdir branch April 25, 2018 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants