./gradlew assembleRelease does not pick up the latest terminal env variable. Tried restarting the terminal and ./gradlew clean but still no use.
I’ve logged process.env variables in metro config. If I start it with npx react-native start --reset-cache it shows the latest process env variable. But if I try ./gradlew assembleRelease it shows old assigned env variables.
>Solution :
Try restarting the gradle process.
Step 1: ./gradlew --stop
Step 2: ./gradlew assembleRelease