Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find the gradle.properties file in the react native apk instructions

I'm following the instructions for a signed apk with react native https://facebook.github.io/react-native/docs/signed-apk-android.html

MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****

However, in the step for setting up gradle variables, I can't find the ~/.gradle/gradle.properties file on my mac. I see a ~/.gradle folder but I don't see the gradle.properties file there, should I create one? Alternatively, I see a /android/gradle.properties file in my project folder - should I update the gradle variables there instead?

Also, should I replace the MYAPP keyword with my app's name? If so, where do I find the key to replace that with - is that based on some sort of setting? e.g. FOOAPP_RELEASE_STORE_FILE ...

like image 986
MonkeyBonkey Avatar asked Mar 23 '17 12:03

MonkeyBonkey


1 Answers

Go ahead and create one in your user folder ~/.gradle/gradle.properties. Gradle can work with global (user variables) or with project ones.

The names of your variables doesn't matter either, but you have to remember to use them correctly when storing & reading values.

Also you have to create keystore for your app as described in React Native - Generating Signed Apk

like image 181
nehvaleem Avatar answered Sep 21 '22 12:09

nehvaleem