You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/06/16 18:08:46 UTC

[GitHub] raphinesse closed pull request #452: Emit log event instead of logging directly

raphinesse closed pull request #452: Emit log event instead of logging directly
URL: https://github.com/apache/cordova-android/pull/452
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/templates/cordova/lib/builders/GradleBuilder.js b/bin/templates/cordova/lib/builders/GradleBuilder.js
index 669a35bda..cec20791b 100644
--- a/bin/templates/cordova/lib/builders/GradleBuilder.js
+++ b/bin/templates/cordova/lib/builders/GradleBuilder.js
@@ -24,6 +24,7 @@ var path = require('path');
 var shell = require('shelljs');
 var superspawn = require('cordova-common').superspawn;
 var CordovaError = require('cordova-common').CordovaError;
+var events = require('cordova-common').events;
 var check_reqs = require('../check_reqs');
 
 var GenericBuilder = require('./GenericBuilder');
@@ -178,7 +179,7 @@ GradleBuilder.prototype.prepBuildFiles = function () {
     };
 
     subProjects.forEach(function (p) {
-        console.log('Subproject Path: ' + p);
+        events.emit('log', 'Subproject Path: ' + p);
         var libName = p.replace(/[/\\]/g, ':').replace(name + '-', '');
         depsList += '    implementation(project(path: "' + libName + '"))';
         insertExclude(p);
diff --git a/bin/templates/cordova/lib/builders/StudioBuilder.js b/bin/templates/cordova/lib/builders/StudioBuilder.js
index 17cdfd587..81d9240f9 100644
--- a/bin/templates/cordova/lib/builders/StudioBuilder.js
+++ b/bin/templates/cordova/lib/builders/StudioBuilder.js
@@ -23,6 +23,7 @@ var util = require('util');
 var path = require('path');
 var shell = require('shelljs');
 var spawn = require('cordova-common').superspawn.spawn;
+var events = require('cordova-common').events;
 var CordovaError = require('cordova-common').CordovaError;
 var check_reqs = require('../check_reqs');
 
@@ -167,7 +168,7 @@ StudioBuilder.prototype.prepBuildFiles = function () {
         }
     };
     subProjects.forEach(function (p) {
-        console.log('Subproject Path: ' + p);
+        events.emit('log', 'Subproject Path: ' + p);
         var libName = p.replace(/[/\\]/g, ':').replace(name + '-', '');
         if (libName !== 'app') {
             depsList += '    implementation(project(path: ":' + libName + '"))';


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org