Skip to content

Commit

Permalink
Merge pull request #9162 from janvennemann/TIMOB-24834
Browse files Browse the repository at this point in the history
[TIMOB-24834] Android: Merge value resources into single file
  • Loading branch information
mukherjee2 committed Jun 20, 2017
2 parents 36802f4 + def425c commit 5a7b025
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions android/cli/lib/base-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ AndroidBaseBuilder.prototype.writeXmlFile = function writeXmlFile(srcOrDoc, dest
}
fs.writeFileSync(dest, '<?xml version="1.0" encoding="UTF-8"?>\n' + srcDoc.toString());
return;
} else {
// Resource sets under a qualifier all need to be merged into a single values
// file so we adjust the destination path here if necessary
var valueResourcesPattern = /res\/(values(?:-[^/]+)?)\/.*/i;
var match = dest.match(valueResourcesPattern);
if (match !== null) {
var resourceQualifier = match[1];
dest = path.join(destDir, resourceQualifier + '.xml');
destExists = fs.existsSync(dest);
}
}

if (destExists) {
Expand Down

0 comments on commit 5a7b025

Please sign in to comment.