Pass project config.xml path to platform's prepare #751
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Platforms affected
all
Motivation and Context
Currently we're passing in an already-constructed ConfigParser instance as part of the fake projectInfo object, but the problem is that it's constructed with the version of cordova-common depended on by cordova-lib as opposed to the version of cordova-common depended on by the platform.
See apache/cordova-ios#535 and apache/cordova-android#690
Description
Pass the path to the root config.xml in, so that we can construct the ConfigParser at the Platform API level, using the correct version.
In the meantime, for compatibility reasons, we have to keep passing in a ConfigParser instance, and the Platform API needs to handle the case where rootConfigXml is undefined and it needs to fetch the path out of the existing ConfigParser instance and then overwrite it with a newly constructed ConfigParser.
We should at some point look into making this "root project info" object a class in cordova-common so that we can document what it's expected to contain and rely on that both here and in the platforms.
Testing
Unit tests pass.
Checklist