Skip to content

Commit

Permalink
Emit log event instead of logging directly (#452)
Browse files Browse the repository at this point in the history
in builder scripts
  • Loading branch information
raphinesse authored and Christopher J. Brody committed Jul 11, 2018
1 parent 3570ca8 commit 9f33b0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/templates/cordova/lib/builders/GradleBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion bin/templates/cordova/lib/builders/StudioBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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 + '"))';
Expand Down

0 comments on commit 9f33b0b

Please sign in to comment.