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: only install corresponding abi package when possible #5635

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

farfromrefug
Copy link
Contributor

@farfromrefug farfromrefug commented Feb 20, 2022

This PR changes the way the installOnDevice works.
The idea is to be compatible with apk split on android.
The reason for this is multiple:

  • much smaller apps on device/emulator. It gets really boring to get warning about emulator not having enough space.
  • faster install
  • it is the first step to other features like only build device ABI

The way it works is this:

  • track device abis (might be multiple as a 64 device almost always accept 32bit apks).
  • When deploying see how many .apk files were built:
    - 1: always install this one
    - more than 1: if 64bit abi or 32bit abi package found use this one
    - more than 1: if not look for universal one found use this one
    - otherwise => error

I also applied the same rule for copy copyLatestAppPackage To (thus renamed to copyAppPackages )

  • if copyTo is an existing directory or a path which does not end with aab|ipa|apk copy all packages to copyTo as a directory
  • if copyTo is a file name
    • if only one package in output dir then copy it
    • copy only universal package if existing

There is one thing bugging be for which i have not found a solution. Because of this line if there are multiple packages there will be warning about it which is wrong in its meaning when using run. Might also be wrong in other cases and we can simply remove the warning ...

@project-bot project-bot bot added this to Pull Request in CLI Team Feb 20, 2022
@cla-bot cla-bot bot added the cla: yes label Feb 20, 2022
farfromrefug and others added 7 commits October 10, 2022 11:17
…d to rebuild for devices we are building for
…kage

# Conflicts:
#	lib/controllers/build-controller.ts
#	lib/services/device/device-install-app-service.ts
…es for `run|debug`

this passes a gradle `abiFilters` arg to the build process which could allow the gradle config to only build abis of connected devices.
* build faster
* could be used with split to only deploy a smaller apk to each device depending on its abi

Default to false for now. Could become the default later

It requires an update to the gradle file in the android runtime
# Conflicts:
#	lib/definitions/android-plugin-migrator.d.ts
@farfromrefug
Copy link
Contributor Author

@rigor789 i updated that PR with my latest changes. I now check for changes on next builds to see if the arch of the device is different from the arch of what we built previously. It now works in all cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
CLI Team
  
Pull Request
Development

Successfully merging this pull request may close these issues.

None yet

1 participant