Skip to content

Commit

Permalink
Merge pull request #17 from shankari/make_plugins_independent
Browse files Browse the repository at this point in the history
Make the hook synchronous
  • Loading branch information
shankari authored Jul 30, 2018
2 parents 79ec69e + 8370da1 commit 79cccc9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions hooks/android/addResourcesClassImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var walk = function(ctx, dir, done) {
});
});
});
};
}

module.exports = function (ctx) {
// If Android platform is not installed, don't even execute
Expand All @@ -66,8 +66,6 @@ module.exports = function (ctx) {
path = ctx.requireCordovaModule('path'),
Q = ctx.requireCordovaModule('q');

var deferral = Q.defer();

var platformSourcesRoot = path.join(ctx.opts.projectRoot, 'platforms/android/src');
var pluginSourcesRoot = path.join(ctx.opts.plugin.dir, 'src/android');

Expand All @@ -78,7 +76,6 @@ module.exports = function (ctx) {
console.log("walk callback with files = "+files);
if (err) {
console.error('Error when reading file:', err)
deferral.reject();
return
}

Expand Down Expand Up @@ -155,9 +152,6 @@ module.exports = function (ctx) {
Q.all(deferrals)
.then(function() {
console.log('Done with the hook!');
deferral.resolve();
})
});

return deferral.promise;
}

0 comments on commit 79cccc9

Please sign in to comment.