1

I did as the document with .env file picker like this

project.ext.envConfigFiles = [
    debug                  : ".env",
    release                : ".env.production",
    adhoc                  : ".env.test",
    asiaRelease        : ".env.production",
    usRelease           : ".env.production",]

And I setup my project with flavors like this

flavorDimensions "env"

productFlavors {
    asia_dev {
        dimension "env"
        applicationIdSuffix ".asia.dev"
    }
    asia {
        dimension "env"
        applicationIdSuffix ".asia"
    }
    us_dev {
        dimension "env"
        applicationIdSuffix ".us.dev"
    }
    us {
        dimension "env"
        applicationIdSuffix ".us"
    }
}

As I expect when I make build with release, the flavor usRelease and asiaRelease will pick the ".env.production". However, it always picks the ".env" file Could you guys help me what's going wrong in this case? Thanks

Khoa Luu
  • 125
  • 4

0 Answers0