Open Angelk90 opened 1 year ago
Every time I change the package I would like the android version of the app to change, because it can happen that I forget about it and then it takes some time before I notice it.
That's a good point, but there are also a number of use cases where users don't want this behavior because the Android & iOS versioning scheme are following different numbering. Say they apply a fix on iOS only and don't want to bump the Android version.
The snippet you suggested is valid though and helps you achieve what you're looking for
@cortinico : So what would you suggest? I wish this functionality was in the react native template, do you think it can be accepted or not?
Sadly this can't be accepted as it is:
def inputFile = new File("$rootDir/../package.json")
here you're making an assumption on where the package.json
lives, which is not going to work well for users for monorepos.
Plus as I mentioned, we update the template adding functionalities that are needed for the majority of our users. So far you're the first one I've heard needing this feature. If there is enough demand around this, we can consider updating the template to support this feature.
Introduction
Every time I change the package I would like the android version of the app to change, because it can happen that I forget about it and then it takes some time before I notice it.
Details
In the file:
https://github.com/facebook/react-native/packages/react-native/template/android/app/build.gradle
Add and edit like this:
Discussion points
In order to always have the package version aligned with the android app version.
The same could be said for ios.