CB-12077: Fix paths for Android icons/splashscreens

This closes #343
This commit is contained in:
Darryl Pogue 2016-10-28 13:05:01 -07:00 committed by Joe Bowser
parent 1f06176149
commit 854946e313
2 changed files with 6 additions and 6 deletions

View File

@ -66,7 +66,7 @@ function Api(platform, platformRootDir, events) {
this.locations = {
root: self.root,
www: path.join(self.root, 'assets/www'),
res: path.relative(self.root, path.join(self.root, 'res')),
res: path.join(self.root, 'res'),
platformWww: path.join(self.root, 'platform_www'),
configXml: path.join(self.root, 'res/xml/config.xml'),
defaultConfigXml: path.join(self.root, 'cordova/defaults.xml'),
@ -85,7 +85,7 @@ function Api(platform, platformRootDir, events) {
this.locations.strings = path.join(self.root, 'app/src/main/res/xml/strings.xml');
this.locations.manifest = path.join(self.root, 'app/src/main/AndroidManifest.xml');
this.locations.www = path.join(self.root, 'app/src/main/assets/www');
this.locations.res = path.relative(self.root, path.join(self.root, 'app/src/main/res'));
this.locations.res = path.join(self.root, 'app/src/main/res');
}
}

View File

@ -46,8 +46,8 @@ module.exports.prepare = function (cordovaProject, options) {
return updateProjectAccordingTo(self._config, self.locations);
})
.then(function () {
updateIcons(cordovaProject, self.locations.res);
updateSplashes(cordovaProject, self.locations.res);
updateIcons(cordovaProject, path.relative(cordovaProject.root, self.locations.res));
updateSplashes(cordovaProject, path.relative(cordovaProject.root, self.locations.res));
})
.then(function () {
events.emit('verbose', 'Prepared android project successfully');
@ -70,8 +70,8 @@ module.exports.clean = function (options) {
var self = this;
return Q().then(function () {
cleanWww(projectRoot, self.locations);
cleanIcons(projectRoot, projectConfig, self.locations.res);
cleanSplashes(projectRoot, projectConfig, self.locations.res);
cleanIcons(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res));
cleanSplashes(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res));
});
};