Skip to content
Permalink
Browse files
Pass project config.xml path to platform's prepare (#751)
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*. By passing the path in, 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.
  • Loading branch information
dpogue authored and erisu committed Mar 15, 2019
1 parent 733b3a4 commit b5edb57b6f0e86cf3d764df1d13afa2e6833b157
Showing 1 changed file with 2 additions and 1 deletion.
@@ -86,7 +86,8 @@ function preparePlatforms (platformList, projectRoot, options) {
projectConfig: new ConfigParser(cordova_util.projectConfig(projectRoot)),
locations: {
plugins: path.join(projectRoot, 'plugins'),
www: cordova_util.projectWww(projectRoot)
www: cordova_util.projectWww(projectRoot),
rootConfigXml: cordova_util.projectConfig(projectRoot)
}
};
// CB-9987 We need to reinstall the plugins for the platform it they were added by cordova@<5.4.0

0 comments on commit b5edb57

Please sign in to comment.