mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Merge pull request #691 from dpogue/common-configparser
Run prepare with the correct ConfigParser version
This commit is contained in:
commit
9531dbbc7b
8
bin/templates/cordova/Api.js
vendored
8
bin/templates/cordova/Api.js
vendored
@ -25,6 +25,7 @@ var PluginManager = require('cordova-common').PluginManager;
|
|||||||
|
|
||||||
var CordovaLogger = require('cordova-common').CordovaLogger;
|
var CordovaLogger = require('cordova-common').CordovaLogger;
|
||||||
var selfEvents = require('cordova-common').events;
|
var selfEvents = require('cordova-common').events;
|
||||||
|
var ConfigParser = require('cordova-common').ConfigParser;
|
||||||
|
|
||||||
var PLATFORM = 'android';
|
var PLATFORM = 'android';
|
||||||
|
|
||||||
@ -71,10 +72,7 @@ function Api (platform, platformRootDir, events) {
|
|||||||
strings: path.join(appRes, 'values', 'strings.xml'),
|
strings: path.join(appRes, 'values', 'strings.xml'),
|
||||||
manifest: path.join(appMain, 'AndroidManifest.xml'),
|
manifest: path.join(appMain, 'AndroidManifest.xml'),
|
||||||
build: path.join(this.root, 'build'),
|
build: path.join(this.root, 'build'),
|
||||||
javaSrc: path.join(appMain, 'java'),
|
javaSrc: path.join(appMain, 'java')
|
||||||
// NOTE: Due to platformApi spec we need to return relative paths here
|
|
||||||
cordovaJs: 'bin/templates/project/assets/www/cordova.js',
|
|
||||||
cordovaJsSrc: 'cordova-js-src'
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,6 +172,8 @@ Api.prototype.getPlatformInfo = function () {
|
|||||||
* CordovaError instance.
|
* CordovaError instance.
|
||||||
*/
|
*/
|
||||||
Api.prototype.prepare = function (cordovaProject, prepareOptions) {
|
Api.prototype.prepare = function (cordovaProject, prepareOptions) {
|
||||||
|
cordovaProject.projectConfig = new ConfigParser(cordovaProject.locations.rootConfigXml || cordovaProject.projectConfig.path);
|
||||||
|
|
||||||
return require('./lib/prepare').prepare.call(this, cordovaProject, prepareOptions);
|
return require('./lib/prepare').prepare.call(this, cordovaProject, prepareOptions);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user