'build a json file as combining flavors in android

I am currently using a json file under asset. this json file looks something like this(just an example):

{
  "endpoint": "https://testServer.com",
  "appId": "aaaaaa",
  "verificationType": "digit",
  "version": "1.0"
}

I have different values for endpoint and verificationType like:
endpoints : testServer, prodServer
verificationType: digit, alphanumeric, bio
(appId and version are currently not changing at the moment)
so I would like to create flavors for those with this:

flavorDimensions "verificationType", "endpoint"

productFlavors {

    digit {
        dimension "verificationType"
    }
    alphanumeric {
        dimension "verificationType"
    }
    bio {
        dimension "verificationType"
    }

    testServer {
        dimension "endpoint"
    }
    prodServer {
        dimension "endpoint"
    }
}

then I created folder directories for each flavor.

now, I want to know how to create each json file under asset folder in each flavor directory. for example, I want to put only "verificationType": "digit" in json file in asset folder under digit flavor directory. then put "endpoint": "testServer" in json file in asset folder under testServer flavor directory. and so on.

is this something doable thing? otherwise any other approach recommended for this situation?

Thank you in andvance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source