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

feat(android): use proguard files #14011

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
11 changes: 4 additions & 7 deletions android/cli/commands/_build.js
Expand Up @@ -916,7 +916,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
this.minifyCSS = true;
this.allowDebugging = false;
this.allowProfiling = false;
this.proguard = false;
this.proguard = true;
break;

case 'test':
Expand Down Expand Up @@ -1017,12 +1017,9 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
}

// check that the proguard config exists
const proguardConfigFile = path.join(cli.argv['project-dir'], '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));
logger.error(__('For example configurations, visit %s', 'http://proguard.sourceforge.net/index.html#manual/examples.html') + '\n');
process.exit(1);
const localProguardConfigFile = path.join(cli.argv['project-dir'], 'platform', 'android', 'proguard.cfg');
if (this.proguard && fs.existsSync(localProguardConfigFile)) {
this.proguardConfigFile = localProguardConfigFile;
}

// map sdk versions to sdk targets instead of by id
Expand Down