-
Notifications
You must be signed in to change notification settings - Fork 127
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
Proposal: remove enableSeparateBuildPerCPUArchitecture
from the Android Template
#602
Comments
cortinico
added a commit
to cortinico/react-native
that referenced
this issue
Mar 1, 2023
…tirely Summary: See react-native-community/discussions-and-proposals#602 for more context. TL;DR: this flag is used for an edge case. We should not expose it to every users but move it to a guide. I'll publish a guide on the website on how to achieve the same feature. Changelog: [Android] [Changed] - Remove the enableSeparateBuildPerCPUArchitecture from the template entirely Reviewed By: cipolleschi Differential Revision: D43695574 fbshipit-source-id: 4c5aa2df1c993da651169fd80944be552400f252
cortinico
added a commit
to cortinico/react-native
that referenced
this issue
Mar 1, 2023
…tirely (facebook#36341) Summary: Pull Request resolved: facebook#36341 See react-native-community/discussions-and-proposals#602 for more context. TL;DR: this flag is used for an edge case. We should not expose it to every users but move it to a guide. I'll publish a guide on the website on how to achieve the same feature. Changelog: [Android] [Changed] - Remove the enableSeparateBuildPerCPUArchitecture from the template entirely Reviewed By: cipolleschi Differential Revision: D43695574 fbshipit-source-id: 0a8bc7a169804de41e0b0cf813d184301635b907
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this issue
Mar 1, 2023
…tirely (#36341) Summary: Pull Request resolved: #36341 See react-native-community/discussions-and-proposals#602 for more context. TL;DR: this flag is used for an edge case. We should not expose it to every users but move it to a guide. I'll publish a guide on the website on how to achieve the same feature. Changelog: [Android] [Changed] - Remove the enableSeparateBuildPerCPUArchitecture from the template entirely Reviewed By: cipolleschi Differential Revision: D43695574 fbshipit-source-id: a4f2df755f1d7bd0319a8e418c4ce96b541009ed
Closing as this has landed and will be included in 0.72 |
OlimpiaZurek
pushed a commit
to OlimpiaZurek/react-native
that referenced
this issue
May 22, 2023
…tirely (facebook#36341) Summary: Pull Request resolved: facebook#36341 See react-native-community/discussions-and-proposals#602 for more context. TL;DR: this flag is used for an edge case. We should not expose it to every users but move it to a guide. I'll publish a guide on the website on how to achieve the same feature. Changelog: [Android] [Changed] - Remove the enableSeparateBuildPerCPUArchitecture from the template entirely Reviewed By: cipolleschi Differential Revision: D43695574 fbshipit-source-id: a4f2df755f1d7bd0319a8e418c4ce96b541009ed
personalizedrefrigerator
added a commit
to personalizedrefrigerator/joplin
that referenced
this issue
Sep 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Introduction
I'd like to propose to remove the
enableSeparateBuildPerCPUArchitecture
config from the new app template.I'm not opening a full RFC as I believe this is going to be quite of a small change, but before we proceed with it, I'd like to collect some feedback and understand if there are any concerns.
Motivation
Currently the new app template includes a field called
enableSeparateBuildPerCPUArchitecture
which is defaulted tofalse
. When set to true, this field controls if the APK produced by the:app:assemble<Flavor>
tasks should be split per ABI (so produce 4 of them["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
) or should instead by a single APK.This field was introduced in 2016 (see here) when APK was the only format to upload apps to the play store.
Now in 2023, App Bundles are enforced to upload to the Play Store (https://en.wikipedia.org/wiki/Android_App_Bundle).
The only valid use case of setting
enableSeparateBuildPerCPUArchitecture
totrue
, is if you're looking into uploading split APKs to alternative stores (like FDroid) or distribute your app manually.On top of this, users could still create an App Bundle, and use bundletool to create split APKs from it as they wish.
Usage
From a quick Github Search, it seems like we have:
true
(source)false
(source)Benefits
Given it's low usage, I believe we can remove this configuration (i.e. effectively hardcode it to false) and reduce the template size. We're effectively distributing build logic that won't be executed by the majority of users, but that can easily break upon app udpates.
Specifically the
applicationVariants.all {
block is probably going away in a future version of AGP and will break all the apps once we'll have to update.I don't believe the app template should offer configuration for all possible scenarios, but just handle the most common use cases, here being using App Bundles or Universal APKs.
Details
Practically, I'd like to remove the following lines from the
android/app/build.gradle
:We can then move the instructions to a dedicate guide on the reactnative.dev website on how to "publish to alternate stores" or use Split APKs.
Discussion points
Happy to collect feedback on this proposal and collect new ideas.
The text was updated successfully, but these errors were encountered: