# react-native-android-version-updater

> "React Native Version Updater is a utility package that simplifies the process of updating version codes and version names in your React Native app's Android build.gradle file. It provides a script that can be run to automatically increment the versionCod

Latest version **2.0.1** (published 2023-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-android-version-updater
pnpm add react-native-android-version-updater
yarn add react-native-android-version-updater
bun add react-native-android-version-updater
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2023-05-12 |
| First published | 2023-05-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Fotios Tsakiris |
| Maintainers | fotios |
| Keywords | react-native, mobile, app, development, version, management, build.gradle, automation, Android, release, deployment, version, control, software, development, updates, package, management, CI/CD, continuous, integration, continuous, deployment |

## Links

- npm: https://www.npmjs.com/package/react-native-android-version-updater
- Repository: https://github.com/React-Native-npm-packages/react-native-android-version-updater
- Homepage: https://github.com/React-Native-npm-packages/react-native-android-version-updater#readme
- Issues: https://github.com/React-Native-npm-packages/react-native-android-version-updater/issues
- npm.io page: https://npm.io/package/react-native-android-version-updater

## Dependencies (1)

- [fs](https://npm.io/package/fs.md) ^0.0.1-security

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2023-05-12
- 2.0.0 — 2023-05-12
- 1.0.11 — 2023-05-11
- 1.0.10 — 2023-05-10
- 1.0.9 — 2023-05-10
- 1.0.8 — 2023-05-09
- 1.0.7 — 2023-05-09
- 1.0.6 — 2023-05-09
- 1.0.5 — 2023-05-09
- 1.0.4 — 2023-05-09
- 1.0.3 — 2023-05-09
- 1.0.2 — 2023-05-09
- 1.0.1 — 2023-05-09
- 1.0.0 — 2023-05-09

## README

# React Native Version Updater 🚀 😂

React Native Version Updater is a utility package that simplifies the process of updating version codes and version names in your React Native app's Android build.gradle file. It provides functions that can be used to automatically increment the versionCode and versionName values, making it easier to manage versioning for your Android releases. 📦

## Installation

🔧 You can install React Native Version Updater using npm:

```shell
npm install --save-dev react-native-android-version-updater
```

## Usage 📝

To use the React Native Version Updater package, follow these steps:

1️⃣ Create three script files in your project's directory:

- To update only the `versionCode`, create a script file named `update-version-code.js` with the following content:

**update-version-code.js**

```js
const { updateVersionCode } = require("react-native-android-version-updater");
updateVersionCode();
```

- To update both the `versionCode` and `versionName`, create a script file named `update-both.js` with the following content:

**update-both.js**

```js
const { updateBoth } = require("react-native-android-version-updater");
updateBoth();
```

- To update both the `versionCode` and `versionName` - **major**, create a script file named `update-major.js` with the following content:

**update-major.js**

```js
const { updateMajor } = require("react-native-android-version-updater");
updateMajor();
```

2️⃣ Open your `package.json` file and add the following scripts:

```js
"scripts": {
  "updateVersion": "node update-version-code.js",
  "updateBoth": "node update-both.js",
  "updateMajor": "node update-major.js"
},

```

3️⃣ How to use the scripts:

- To update only the versionCode, run: `npm run updateVersion`
- To update both the `versionCode` and `versionName`, run:`npm run updateBoth`
- To update both the `versionCode` and `versionName` - **major**, run:`npm run updateMajor`

By running the respective scripts, the `build.gradle` file located at `android/app/build.gradle` will be automatically updated.

## License

This package is licensed under the MIT License.

## Contributing

Contributions are welcome! If you have any bug reports, feature requests, or suggestions, please open an issue or submit a pull request.

## Acknowledgements 🙌 🎉

This package was inspired by the need for a convenient version updater for React Native apps.

## Contact 📧

For any inquiries or questions, feel free to reach out to us at footios76@gmail.com.

Feel free to modify and customize the content to suit your package and add any additional information that you find relevant.

---
_Source: https://npm.io/package/react-native-android-version-updater · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
