Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def buildConfigAndResStringField(variant, name, value) {
variant.resValue 'string', name.toLowerCase(), value
variant.buildConfigField 'String', name, "\"$value\""
}
afterEvaluate {
android.applicationVariants.all { variant ->
variant.resValue 'string', 'application_id', variant.applicationId
buildConfigAndResStringField variant, "ACCOUNT_TYPE", variant.applicationId
buildConfigAndResStringField variant, "CONTENT_AUTHORITY", variant.applicationId + ".provider"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.