Allow color resources to be used in vector drawables.

Without these changes, hard coded colors must be used on APIs prior to 24.
This commit is contained in:
Kevin Gorham 2020-08-27 20:20:27 -04:00
parent 35d268622c
commit 953aeb32ea
No known key found for this signature in database
GPG Key ID: CCA55602DF49FC38
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ android {
testInstrumentationRunnerArguments clearPackageData: 'true'
multiDexEnabled true
resValue 'string', 'bugsnag_api_key', "${(project.findProperty('BUGSNAG_API_KEY') ?: System.getenv('BUGSNAG_API_KEY')) ?: ''}"
// this setting allows using color resources in vector drawables, rather than hardcoded values (note: only works when minApi is 21)
// per https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.VectorDrawablesOptions.html: If set to an empty collection, all special handling of vector drawables will be disabled.
vectorDrawables.generatedDensities = []
}
flavorDimensions 'network'
productFlavors {