cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <>
Subject [GitHub] cordova-android pull request: CB-11117: Use FileUpdater to optimiz...
Date Thu, 28 Apr 2016 20:58:02 GMT
Github user vladimir-kotikov commented on a diff in the pull request:
    --- Diff: bin/templates/cordova/lib/prepare.js ---
    @@ -26,26 +26,43 @@ var AndroidManifest = require('./AndroidManifest');
     var xmlHelpers = require('cordova-common').xmlHelpers;
     var CordovaError = require('cordova-common').CordovaError;
     var ConfigParser = require('cordova-common').ConfigParser;
    +var FileUpdater = require('cordova-common').FileUpdater;
    -module.exports.prepare = function (cordovaProject) {
    +module.exports.prepare = function (cordovaProject, options) {
         var self = this;
    +    var platformResourcesDir = path.relative(cordovaProject.root, path.join(this.locations.root,
         this._config = updateConfigFilesFrom(cordovaProject.projectConfig,
             this._munger, this.locations);
         // Update own www dir with project's www assets and plugins' assets and js-files
    -    return Q.when(updateWwwFrom(cordovaProject, this.locations))
    +    return Q.when(, cordovaProject))
         .then(function () {
             // update project according to config.xml changes.
             return updateProjectAccordingTo(self._config, self.locations);
         .then(function () {
    -        handleIcons(cordovaProject.projectConfig, self.root);
    -        handleSplashes(cordovaProject.projectConfig, self.root);
    +, cordovaProject, platformResourcesDir);
    +, cordovaProject, platformResourcesDir);
         .then(function () {
    -        events.emit('verbose', 'updated project successfully');
    +        events.emit('verbose', 'Prepared project successfully');
    +    });
    +module.exports.clean = function (options) {
    +    // Unfortunately the cordovaProject isn't passed into the clean() function,
    +    // but the project root dir and config can be resolved here easily.
    --- End diff --
    In fact there is no big difference between calling `gradle clean` and `cordova/clean.bat`but
non-CLi workflow assumes that there is a contract between platform and user, according to
which platform offers a set of shell scripts to control the aspects related to build system,
and the `clean` is one of these scripts just as `build`, `run`, etc - you can find them inside
of 'android/cordova' folder
    One of advantages of calling `clean` rather that `gradle clean` is that you might not
have `gradle` available in path, but `clean` contains some logic (similar to build) to find
gradle wrapper, and call it with appropriate arguments

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message