Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-17446] CLI args to specify i18n and platform locations #6602

Merged
merged 2 commits into from
Jan 30, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions android/cli/commands/_build.js
Expand Up @@ -1040,7 +1040,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
}

// check that the proguard config exists
var proguardConfigFile = path.join(cli.argv['project-dir'], 'platform', 'android', 'proguard.cfg');
var proguardConfigFile = path.join(cli.argv['project-dir'], cli.argv['platform-directory'] || 'platform', 'android', 'proguard.cfg');
if (this.proguard && !fs.existsSync(proguardConfigFile)) {
logger.error(__('Missing ProGuard configuration file'));
logger.error(__('ProGuard settings must go in the file "%s"', proguardConfigFile));
Expand All @@ -1065,7 +1065,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
}

try {
var customAndroidManifestFile = path.join(cli.argv['project-dir'], 'platform', 'android', 'AndroidManifest.xml');
var customAndroidManifestFile = path.join(cli.argv['project-dir'], cli.argv['platform-directory'] || 'platform', 'android', 'AndroidManifest.xml');
this.customAndroidManifest = fs.existsSync(customAndroidManifestFile) && (new AndroidManifest(customAndroidManifestFile));
} catch (ex) {
logger.error(__('Malformed custom AndroidManifest.xml file: %s', customAndroidManifestFile) + '\n');
Expand Down Expand Up @@ -2528,7 +2528,7 @@ AndroidBuilder.prototype.copyResources = function copyResources(next) {
this.modules.forEach(function (module) {
platformPaths.push(path.join(module.modulePath, 'platform', 'android'));
});
platformPaths.push(path.join(this.projectDir, 'platform', 'android'));
platformPaths.push(path.join(this.projectDir, this.cli.argv['platform-directory'] || 'platform', 'android'));
platformPaths.forEach(function (dir) {
if (fs.existsSync(dir)) {
tasks.push(function (cb) {
Expand Down
4 changes: 2 additions & 2 deletions iphone/cli/commands/_build.js
Expand Up @@ -3153,8 +3153,8 @@ iOSBuilder.prototype.copyResources = function copyResources(finished) {
});

var platformPaths = [
path.join(this.projectDir, 'platform', 'iphone'),
path.join(this.projectDir, 'platform', 'ios')
path.join(this.projectDir, this.cli.argv['platform-directory'] || 'platform', 'iphone'),
path.join(this.projectDir, this.cli.argv['platform-directory'] || 'platform', 'ios')
];
// WARNING! This is pretty dangerous, but yes, we're intentionally copying
// every file from platform/iphone|ios and all modules into the build dir
Expand Down
7 changes: 7 additions & 0 deletions node_modules/titanium-sdk/lib/i18n.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.