-
Notifications
You must be signed in to change notification settings - Fork 659
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
Run assembleRelease with different configs per flavour #438
Comments
altany
changed the title
Run assembleRelease with different configs per flavor
Run assembleRelease with different configs per flavour
Mar 27, 2020
try project.ext.envConfigFiles = [
devrelease: ".env",
productionrelease: ".env.production"
] |
@arcollector Thanks a lot, able to end my 8 hour web search journey |
Nope unfortunately nothing worked. @arcollector 's solution did not solve the problem, as the flavour is still read wrong as |
@altany also try to add an empty string as fallback mechanism ie project.ext.envConfigFiles = [
debug: '.env.development',
release: '.env.production',
"": '.env.development',
]
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" |
any update ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We setup our project to have two built types, debug and release, and two flavours, dev and production.
I would like to run
assembleRelease
to build both flavours at the same time and have each one load its own config file.Right now I am only able to run
assembleDevRelease
andassembleProductionRelease
successfully, asDev
andProduction
are recognised as flavours and the config files are read correctly.However, if I run
assembleRelease
, the flavour is read asRelease
and both .apks use the default.env
file, which is wrong.Is there a way to write the
envConfigFiles
array to get this done?Looking at the code there seems to be no way to read two different configs in one go (one per flavour), but if I get some guidance I am happy to look into it myself and maybe create a PR.
The text was updated successfully, but these errors were encountered: