diff --git a/package.json b/package.json index 7421d2e5..e9a591e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-dev-webpack", - "version": "1.1.0", + "version": "1.1.1", "main": "index", "description": "", "homepage": "http://www.telerik.com", diff --git a/plugins/NativeScriptSnapshotPlugin/options.json b/plugins/NativeScriptSnapshotPlugin/options.json index 513afd4e..f18a2cd9 100644 --- a/plugins/NativeScriptSnapshotPlugin/options.json +++ b/plugins/NativeScriptSnapshotPlugin/options.json @@ -28,14 +28,16 @@ "default": [ "arm", "arm64", - "ia32" + "ia32", + "ia64" ], "items": { "type": "string", "enum": [ "arm", "arm64", - "ia32" + "ia32", + "ia64" ] } }, diff --git a/snapshot/android/project-snapshot-generator.js b/snapshot/android/project-snapshot-generator.js index be5ef1f3..a208024f 100644 --- a/snapshot/android/project-snapshot-generator.js +++ b/snapshot/android/project-snapshot-generator.js @@ -237,9 +237,18 @@ ProjectSnapshotGenerator.prototype.generate = function (generationOptions) { throw new Error(noV8VersionFoundMessage); } + // NOTE: Order is important! Add new archs at the end of the array + const defaultTargetArchs = ["arm", "arm64", "ia32", "ia64"]; + const runtimeVersion = getAndroidRuntimeVersion(this.options.projectRoot); + if (runtimeVersion && semver.lt(semver.coerce(runtimeVersion), "6.0.2")) { + const indexOfIa64 = defaultTargetArchs.indexOf("ia64"); + // Before 6.0.2 version of Android runtime we supported only arm, arm64 and ia32. + defaultTargetArchs.splice(indexOfIa64, defaultTargetArchs.length - indexOfIa64); + } + const options = { snapshotToolsPath, - targetArchs: generationOptions.targetArchs || ["arm", "arm64", "ia32"], + targetArchs: generationOptions.targetArchs || defaultTargetArchs, v8Version: generationOptions.v8Version || v8Version, preprocessedInputFile: generationOptions.preprocessedInputFile, useLibs: generationOptions.useLibs || false, diff --git a/snapshot/android/snapshot-generator.js b/snapshot/android/snapshot-generator.js index 8c177809..4de65fa6 100644 --- a/snapshot/android/snapshot-generator.js +++ b/snapshot/android/snapshot-generator.js @@ -53,7 +53,7 @@ SnapshotGenerator.prototype.preprocessInputFiles = function (inputFiles, outputF // Example: // (function() { // some code here - // })() + // })() // // sourceMapUrl...... // ** when we join without `;` here, the next IIFE is assumed as a function call to the result of the first IIFE // (function() { @@ -101,7 +101,7 @@ SnapshotGenerator.prototype.convertToAndroidArchName = function (archName) { case "arm": return "armeabi-v7a"; case "arm64": return "arm64-v8a"; case "ia32": return "x86"; - case "x64": return "x64"; + case "ia64": return "x86_64"; default: return archName; } }