openbakery / gradle-xcodePlugin

gradle plugin for building Xcode Projects for iOS, watchOS, macOS or tvOS
Apache License 2.0
455 stars 127 forks source link

added -project parameter for xcodebuild #451

Closed amattil1 closed 2 years ago

amattil1 commented 2 years ago

When having 2 .xcodeproj files in same directory, xcode plugin fails when xcodebuild command is being executed. This is fixed by passing -project option for xcodebuild command.

renep commented 2 years ago

Thanks for the pull request. I have review your changes and have not seen any unit test for your change. As you find in the collobaration section at the Readme you will find the info, that I will not merge pull requests that does not contain unit tests. As soon as you add proper unit tests for your changes, I will merge this pull request.

amattil1 commented 2 years ago

Added test for -project parameter.

amattil1 commented 2 years ago

Any changes to merge the pull request? We would have use for this right away. Using CMake with Xcode, the project will be generated to different folder than where build.gradle resides. xcodeplugin wants the project to exist in same folder which means that cmake needs to generate the build files to same folder as all the other project files, thus writing lot of garbage in the folder and making clean call hard. Also requires lots of svn/git ignore files for cmake temp files. Very messy. With this -project switch I can point the xcodeproj file from subdirectory, and it would all be fine and dandy :) Thanks.

renep commented 2 years ago

Normally I only merge pull request that are on the develop branch. But I think (and hope) that this changes does not break anything. Lets see.

renep commented 2 years ago

There is now a 0.22.2 version with your change.

amattil1 commented 2 years ago

Awesome, thank you! Seems to work as it should. 👍

Only strange thing is that I cannot directly reference the version 0.22.2, I have to use 0.22.+ in build.gradle. I have maven url https://openbakery.org/repository/ and dependencies defined with classpath group: 'org.openbakery', name: 'xcode-plugin', version: '0.22.2' .. result is "Could not find org.openbakery:xcode-plugin:0.22.2."

Any idea why I need to use + instead of 2?