Home > Back-end >  How to change gradlew .env file?
How to change gradlew .env file?

Time:09-24

I have a react native project.

I want to build a release to publish on play store, here in react native official documentation to publish an app we can see:

Generating the release AAB

Run the following in a terminal:

cd android
./gradlew bundleRelease

Here is the first outputs I got:

./gradlew bundleRelease
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :app
Reading env from: .env

gradlew is reading my env vars in .env file while I got a .env.production that I want gradlew to read instead.

How can I do this ?

CodePudding user response:

I would recommend you to use react-native-config if you want to use other type of .env files for different environments.

  • Related