Skip to content

Commit

Permalink
fix(android): Only remove x86 from valid abis if user does not specif…
Browse files Browse the repository at this point in the history
…y abi tag (#10460)

Fixes TIMOB-26548
  • Loading branch information
ewanharris authored and lokeshchdhry committed Nov 13, 2018
1 parent d339158 commit 146e7cf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -1270,13 +1270,15 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {

// determine the abis to support
this.abis = this.validABIs;
if (this.deployType === 'production') {
// by default, remove 'x86' from production builds
// 'x86' devices are scarce; this is predominantly used for emulators
const customABIs = cli.tiapp.android && cli.tiapp.android.abi && cli.tiapp.android.abi.indexOf('all') === -1;
if (!customABIs && this.deployType === 'production') {
// If a users has not specified the abi tag in the tiapp,
// remove 'x86' from production builds 'x86' devices are scarce;
// this is predominantly used for emulators
// we can save 16MB+ by removing this from release builds
this.abis.splice(this.abis.indexOf('x86'), 1);
}
if (cli.tiapp.android && cli.tiapp.android.abi && cli.tiapp.android.abi.indexOf('all') === -1) {
if (customABIs) {
this.abis = cli.tiapp.android.abi;
this.abis.forEach(function (abi) {
if (this.validABIs.indexOf(abi) === -1) {
Expand Down

0 comments on commit 146e7cf

Please sign in to comment.