This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-paramedic.git


The following commit(s) were added to refs/heads/master by this push:
     new 80787fd  fix(android): change order of project setup & plugin install 
(#253)
80787fd is described below

commit 80787fdadefa176c8af5b6f5a2cae64f4a6b01ab
Author: エリス <[email protected]>
AuthorDate: Thu Jan 19 22:24:17 2023 +0900

    fix(android): change order of project setup & plugin install (#253)
    
    * fix: install plugin after test framework plugins
    * fix: change the order of how the project is prepared
---
 lib/ParamedicApp.js | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/lib/ParamedicApp.js b/lib/ParamedicApp.js
index 4597885..e9cbae7 100644
--- a/lib/ParamedicApp.js
+++ b/lib/ParamedicApp.js
@@ -56,9 +56,9 @@ class ParamedicApp {
     }
 
     prepareProjectToRunTests () {
-        this.installPlugins();
-        this.setUpStartPage();
         return this.installPlatform()
+            .then(() => this.installPlugins())
+            .then(() => this.setUpStartPage())
             .then(() => this.checkPlatformRequirements())
             .then(() => this.checkDumpAndroidManifest())
             .then(() => this.checkDumpAndroidConfigXml());
@@ -67,28 +67,32 @@ class ParamedicApp {
     installPlugins () {
         logger.info('cordova-paramedic: installing plugins');
         const pluginsManager = new PluginsManager(this.tempFolder.name, 
this.storedCWD, this.config);
-        pluginsManager.installPlugins(this.config.getPlugins());
-        pluginsManager.installTestsForExistingPlugins();
 
-        const additionalPlugins = 
['github:apache/cordova-plugin-test-framework', path.join(__dirname, '..', 
'paramedic-plugin')];
+        const ciFrameworkPlugins = 
['github:apache/cordova-plugin-test-framework', path.join(__dirname, '..', 
'paramedic-plugin')];
 
         if (this.config.shouldUseSauce() && !this.config.getUseTunnel()) {
-            additionalPlugins.push(path.join(__dirname, '..', 
'event-cache-plugin'));
+            ciFrameworkPlugins.push(path.join(__dirname, '..', 
'event-cache-plugin'));
         }
 
         if (this.isWindows) {
-            additionalPlugins.push(path.join(__dirname, '..', 
'debug-mode-plugin'));
+            ciFrameworkPlugins.push(path.join(__dirname, '..', 
'debug-mode-plugin'));
         }
 
         if (this.isIos) {
-            additionalPlugins.push(path.join(__dirname, '..', 
'ios-geolocation-permissions-plugin'));
+            ciFrameworkPlugins.push(path.join(__dirname, '..', 
'ios-geolocation-permissions-plugin'));
         }
 
         if (this.config.isCI()) {
-            additionalPlugins.push(path.join(__dirname, '..', 'ci-plugin'));
+            ciFrameworkPlugins.push(path.join(__dirname, '..', 'ci-plugin'));
         }
 
-        pluginsManager.installPlugins(additionalPlugins);
+        // Install testing framework
+        logger.info('cordova-paramedic: installing ci framework plugins: ' + 
ciFrameworkPlugins.join(', '));
+        pluginsManager.installPlugins(ciFrameworkPlugins);
+        logger.info('cordova-paramedic: installing plugins:' + 
this.config.getPlugins().join(', '));
+        pluginsManager.installPlugins(this.config.getPlugins());
+        logger.info('cordova-paramedic: installing tests for existing 
plugins');
+        pluginsManager.installTestsForExistingPlugins();
     }
 
     setUpStartPage () {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to