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

Not incrementing versions in AndroidManifest #14

Closed
olegdeezus opened this issue Jan 30, 2017 · 9 comments
Closed

Not incrementing versions in AndroidManifest #14

olegdeezus opened this issue Jan 30, 2017 · 9 comments

Comments

@olegdeezus
Copy link

android:versionCode and android:versionName fields

@stovmascript
Copy link
Owner

Hey @olegdizus. I think RN updates these values in memory during build time. Looking at RN projects I've worked on, I see that they always stay at their default values:

<manifest
	android:versionCode="1"
	android:versionName="1.0"

Why do you need them to be updated?

@jsdario
Copy link

jsdario commented Feb 22, 2017

It seems to me that they are mandatory for the play store, aren't they?

@stovmascript
Copy link
Owner

stovmascript commented Feb 22, 2017

@jsdario I don't dispute that. I'm just saying that I've never seen this file updated since doing react-native init, therefore I don't think RNV should update it either.

When you're building an APK for the Play Store, they should be updated during the build process. Or am I missing something?

@stovmascript
Copy link
Owner

stovmascript commented Feb 22, 2017

I think React Native's behaviour in this case is indeed weird, but it makes sense to update the values only in the Gradle file. Or vice versa, but definitely not in two places.

@stovmascript
Copy link
Owner

stovmascript commented Feb 23, 2017

But I would still like to know if there's any interesting use case that would warrant updating AndroidManifest.xml, because we could then make an extra option for it.

@matthewphiong
Copy link

@stovmascript @jsdario Updating AndroidManifest.xml will not have any effect since the ones written in build.gradle will replace the ones in AndroidManifest.xml during build.

But it might be a good idea to also update the values in AndroidManifest.xml to clear any confusion created by different values of versionCode and versionName in build.gradle and AndroidManifest.xml

@jsdario
Copy link

jsdario commented Mar 6, 2017

The PR above is just a draft on how it was implemented under the organisation I work in. Feel free to copy / paste, improve or close it.

Hope it helps.

@stovmascript
Copy link
Owner

stovmascript commented Mar 6, 2017

@jsdario Ok, thanks.

@stovmascript
Copy link
Owner

I think updating AndroidManifest.xml is out of the scope of this package. RNV's job should be to update the topmost values, which you'd otherwise have to update manually in a RN app. Android manifest files get updated dynamically during build, which is what RN users expect, so updating them with RNV would actually create confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants