Git Product home page Git Product logo

cordova-build-architecture's Introduction

cordova-build-architecture

This plugin allows you to build your application for arm (or x86) only.

Why?

Plugins like cordova-plugin-crosswalk-webview (https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview) create two or more .apk files with one build. On Phonegap Build, you can only download one file which leads to problems if you want to get access to the other .apks.

Also, the Crosswalk plugin sometimes creates a combined arm/x86 file on Phonegap Build even if you set the preference xwalkMultipleApk to true.

Maybe you simply need to build for one architecture because of other reasons? This plugin might help you :-)

Usage

Include this plugin in your config.xml:

<plugin name="cordova-build-architecture" spec="https://github.com/MBuchalik/cordova-build-architecture.git#v1.0.4" source="git" />

By default, it will try to produce arm builds only. If you want to target x86, add the following preference:

<preference name="buildArchitecture" value="x86" />

Advanced configuration

Crosswalk also allows you to generate 64 bit builds. This is usually done via a command line parameter, but also seems to be possible using the following preference:

<preference name="xwalk64bit" value="true" />

If you want to fetch the 64 bit arm build, simply use use

<preference name="buildArchitecture" value="arm64" />

For the 64 bit x86 build, you have to specify the following value:

<preference name="buildArchitecture" value="x86_64" />

Summary

The following values can be used in our buildArchitecture preference:

target platform value should the xwalk64bit preference be set (to true)?
arm arm
arm: 64 bit arm64
x86 x86
x86: 64 bit x86_64

Please note that this plugin is experimental.

cordova-build-architecture's People

Contributors

mbtests avatar mbuchalik avatar vinceops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-build-architecture's Issues

64-bit crosswalk works?

I went ahead and made 64-bit versions of my application and just assumed crosswalk worked with those architectures. I just saw a post on another issue that says it doesn't work. Unfortunately, I don't have a 64-bit device to actually test it. Has anyone confirmed one way or the other whether crosswalk works in x86_64 or arm64? The size of my apk files implies binaries are included.

Support for cordova-android >= 7

When using npm to install cordova-plugin-build-architecture, somehow it's not the last release (1.0.4) that adds support for cordova-android >= 7.

Error on cordova 8.0.0

"cordova": "^8.0.0"
"cordova-android": "^7.1.1"

`* What went wrong:
A problem occurred evaluating script.

/Users/dev/JenkinsHome/workspace/Bayam/_DEV/AppBayam/cordova/platforms/android/app/res/xml/config.xml (No such file or directory)`

I think something changed on cordova-android 7.1.1 (path of app - src).

Multi arch

Hello,

It is a way to ask multi output architecture ?
For my projects, i have to use x86_64 + arm64. I have to build 2 times, with diferent arch preference.
The idea is to can buils 2 arch apk simulaneusly.

nota : it's for a xwalk plugin.

Multiple builds (ARM + ARM64)

Is there any way to make it work with multiple builds such as arm + arm64, instead of just one?
Something like <preference name="buildArchitecture" value="arm,arm64" />, or maybe <preference name="buildArchitecture" value="arm64,x86_64" />

Build error

I use your project but get 1.0.6 version, but this version doesn't build because not find config.xml

https://www.npmjs.com/package/cordova-plugin-build-architecture

i think this bellow fix but in the last version doesn't have this code

  if (file('src/main/res/xml/config.xml').exists()) {
    // Cordova-android >= 7
    file_content = file('src/main/res/xml/config.xml').getText()
  } else {
    file_content = file('res/xml/config.xml').getText()
  }

64 bit builds do not respect version code...

Hello! Thanks for this awesome library!

I am trying to build both 32-bit APKs and 64-bit APKs and upload them to Google Play. In order for Google Play to allow this the 64-bit APKs must have a higher versionCode than the 32-bit version.

I am finding something very strange with Android versionCodes. My app has a version code of: 2320202.

When I build the 32-bit arm7, and upload it to Google Play, I see that the Version Code on Google Play is 23202022. Not sure why there is an extra 2 on the end, but whatever...

Then I build the 64-bit arm7, and upload it to Google Play. I see that the Version Code on Google play for that APK is 2320211. It replaced the last two digits with 11???

The problem is that I can't get the version code for the 64-bit builds to be higher than the 32-bit build because of this issue.

Do you know what is happening here?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.