Not working while building release

I have these scripts to run and build the app:

"android": "ENVFILE=.env.development react-native run-android",
"ios": "ENVFILE=.env.development react-native run-ios",
"start": "ENVFILE=.env.development react-native start",
"apk": "cd android && ENVFILE=.env.development ./gradlew assembleRelease",
"aab": "cd android && ENVFILE=.env.production ./gradlew buildRelease",

Among them first the first three is working fine. But the ones involving cd is not not. I tried ENVFILE=../.env.development. That is not working either. I’ve also tried setting them in android/app/build.gradle

project.ext.envConfigFiles = [
    debug: ".env.development",
    release: ".env.production",
]

1 thought on “Not working while building release

Comments are closed.