This package delivers a CLI command
manage-build which handles the whole building process for you. More specifically, it takes care of versioning, bundling and building the APK or AAB.
🤖Android only (for now)
In order to install the package, simply use:
npm install react-native-build-manager
yarn add react-native-build-manager
The process of using the command is pretty straightforward.
npx manage-build --[flag(s)]
On the first run, a configuration file will be created in
./build-manager. It currently only stores whether you are using it in an (ejected) expo project or not. This is used to update the
app.json -in the case of an expo project- to ensure consistency.
Output: The APK will be found in
||Show the command's help||
||Show the package's version||
||Predefines what kind of build type you are going for||
||Predefines if the version will stay the same||
As mentioned earlier, on the first run, you will be asked extra questions to create the right configuration. Currently, the configuration only requires to know whether you are using the command in an ejected (bare workflow) expo app or not.
Note: The configuration can be manually edited in case of mistake during the setup by editing the
Preview of the command's use
(I was too lazy to set up an example project for it, but I've tested it on my own private project. Have to take my word for it, I guess
- You specify if you want to increment your version or not. If you chose to increment it, you have the choice of making your new version a major, minor or patch version. (more info @ versioning)
- You are asked if you want your versionCode (more info @ versioning) incremented.
- The new versions are printed on the console.
- You are what kind of build you want:
- Debug APK: An unsigned .apk that can only be used for debugging purposes. This .apk can not be uploaded to Google Play Console.
- Release APK: A signed .apk that can be used for testing your release and be uploaded to Google Play Console.
- Release AAB: A signed .aab whose only purpose is to be uploaded to Google Play Console.
- Release APK and AAB: Self-explanatory.
- You are asked to confirm your input (not shown above .gif).
You will be asked about the versioning. You are given the choice to increment as you think (major, minor, patch) or not increment the version name* at all. You will also be asked about whether or not to increment the version code*.
Version Name: This is the version the user will see. The package only supports the most widely used versioning convention. Semantic Versioning 2.0.0.
Version Code: This is the version Google Play Console uses to determine whether a new version is uploaded and if the user needs to update their application. It is not possible to upload to APK/AAB files with the same version code.
> For more detailed information: https://developer.android.com/studio/publish/versioning