getBuildProperty: get from default or specific build of first target#126
getBuildProperty: get from default or specific build of first target#126ZauberNerd wants to merge 1 commit intoalunny:masterfrom ZauberNerd:fix-target-getBuildProperty
Conversation
|
|
|
After thinking about this a bit more - I think this change doesn't make much sense. It would need the ability to select which target it should read instead of always using the first target. |
Before this change the `getBuildProperty` method would iterate over all targets and their build configurations without an early exit when the property was found - that sometimes lead to having the value of a build property from a later project. After this change the `getBuildProperty` method will search through all buildConfigurations (or a single one, if specified) of the first project target and return as soon as the requested property has been found. This PR can also be used as basis for follow-up PRs, for example: The `productName` getter can use this internally to get the `PRODUCT_NAME` of the correct target. (which in turn would fix: #91 / #99) This PR would probably make [this workaround in react-native](https://github.com/facebook/react-native/blob/0af640b/local-cli/link/ios/getBuildProperty.js#L4) obsolete.
Before this change the
getBuildPropertymethod would iterate over alltargets and their build configurations without an early exit when the
property was found - that sometimes lead to having the value of a build
property from a later project.
After this change the
getBuildPropertymethod will search through allbuildConfigurations (or a single one, if specified) of the first project
target and return as soon as the requested property has been found.
This PR can also be used as basis for follow-up PRs, for example: The
productNamegetter can use this internally to get thePRODUCT_NAMEof the correct target. (which in turn would fix: #91 / #99)
This PR would probably make this workaround in react-native obsolete.