Skip to content

Commit

Permalink
Merge branch 'master' into TIMOB-27159
Browse files Browse the repository at this point in the history
  • Loading branch information
lokeshchdhry committed Jan 22, 2020
2 parents 2e30fea + 9695253 commit fc92192
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 26 deletions.
16 changes: 9 additions & 7 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -1281,13 +1281,6 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
// determine the abis to support
this.abis = this.validABIs;
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 (customABIs) {
this.abis = cli.tiapp.android.abi;
this.abis.forEach(function (abi) {
Expand Down Expand Up @@ -1558,6 +1551,15 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
process.exit(1);
}
}
} else {
// Limit application build ABI to that of provided native modules.
this.abis = this.abis.filter(abi => {
if (!module.manifest.architectures.includes(abi)) {
this.logger.warn(__('Module %s does not contain %s ABI. Application will build without %s ABI support!', module.id.cyan, abi.cyan, abi.cyan));
return false;
}
return true;
});
}

// scan the module for any CLI hooks
Expand Down
1 change: 1 addition & 0 deletions android/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ AndroidModuleBuilder.prototype.generateModuleProject = async function generateMo
moduleMavenArtifactId: mavenArtifactId,
moduleName: this.manifest.name,
moduleVersion: this.manifest.version,
moduleArchitectures: this.manifest.architectures.split(' '),
tiBindingsJsonPath: path.join(this.platformPath, 'titanium.bindings.json'),
tiMavenUrl: encodeURI('file://' + path.join(this.platformPath, 'm2repository').replace(/\\/g, '/')),
tiSdkModuleTemplateDir: this.moduleTemplateDir,
Expand Down
2 changes: 1 addition & 1 deletion android/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Josh Quick <jquick@axway.com>",
"Yordan Banev <ybanev@axway.com>"
],
"architectures": ["arm64-v8a", "armeabi-v7a", "x86"],
"architectures": ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"],
"v8": {
"version": "7.9.317.32",
"mode": "release",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
version: 1.0.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: <%- moduleName %>
author: <%- author %>
license: Specify your license
Expand Down
2 changes: 1 addition & 1 deletion android/templates/module/generated/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ android {
}
}
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
abiFilters <%- "'" + moduleArchitectures.join("','") + "'" %>
}
}
externalNativeBuild {
Expand Down
2 changes: 1 addition & 1 deletion android/titanium/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ android {
}
}
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
buildTypes {
Expand Down
34 changes: 20 additions & 14 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"markdown": "0.5.0",
"moment": "^2.22.2",
"node-appc": "^0.3.4",
"node-titanium-sdk": "^4.0.0",
"node-titanium-sdk": "^4.2.1",
"node-uuid": "1.4.8",
"nodeify": "^1.0.1",
"p-limit": "^2.2.0",
Expand Down
Binary file modified support/ti.cloak.zip
Binary file not shown.

0 comments on commit fc92192

Please sign in to comment.