Last active
August 31, 2023 00:35
-
-
Save Takhion/74b67cb518e90faf2708 to your computer and use it in GitHub Desktop.
Workaround for https://code.google.com/p/android/issues/detail?id=71365
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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