From 6533474070cac20dcc6e78abfce9ff4cec1835a6 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Thu, 14 Mar 2019 23:02:53 -0700 Subject: [PATCH 1/2] GH-690: Run prepare with the correct ConfigParser --- bin/templates/cordova/Api.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/templates/cordova/Api.js b/bin/templates/cordova/Api.js index be6b76b9..538c1fef 100644 --- a/bin/templates/cordova/Api.js +++ b/bin/templates/cordova/Api.js @@ -25,6 +25,7 @@ var PluginManager = require('cordova-common').PluginManager; var CordovaLogger = require('cordova-common').CordovaLogger; var selfEvents = require('cordova-common').events; +var ConfigParser = require('cordova-common').ConfigParser; var PLATFORM = 'android'; @@ -174,6 +175,8 @@ Api.prototype.getPlatformInfo = function () { * CordovaError instance. */ 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); }; From d10dd1c0b438ab37f65844de162adafb3ddba165 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Thu, 14 Mar 2019 23:03:14 -0700 Subject: [PATCH 2/2] Remove unused browserify paths --- bin/templates/cordova/Api.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/templates/cordova/Api.js b/bin/templates/cordova/Api.js index 538c1fef..cde6e86a 100644 --- a/bin/templates/cordova/Api.js +++ b/bin/templates/cordova/Api.js @@ -72,10 +72,7 @@ function Api (platform, platformRootDir, events) { strings: path.join(appRes, 'values', 'strings.xml'), manifest: path.join(appMain, 'AndroidManifest.xml'), build: path.join(this.root, 'build'), - 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' + javaSrc: path.join(appMain, 'java') }; }