Skip to content

Commit

Permalink
chore: buildconfig contains variant properties
Browse files Browse the repository at this point in the history
  • Loading branch information
reeshika-h committed Sep 11, 2024
1 parent 255f0e4 commit 56eb5a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contentstack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ android {

def localProperties = new Properties()
localProperties.load(new FileInputStream(rootProject.file("local.properties")))
def variantsArray = localProperties['variantsUID']?.split(",")?.collect { it.trim() }
def variantsAsArrayString = 'new String[] {' + variantsArray.collect { "\"$it\"" }.join(", ") + '}'
buildTypes {
debug {
debuggable true
Expand All @@ -124,6 +126,9 @@ android {
buildConfigField "String", "environment", localProperties['environment']
buildConfigField "String", "contentTypeUID", localProperties['contentType']
buildConfigField "String", "assetUID", localProperties['assetUid']
buildConfigField "String", "variantUID", localProperties['variantUID']
buildConfigField "String", "variantEntryUID", localProperties['variantEntryUID']
buildConfigField "String[]", "variantsUID", variantsAsArrayString
}
release {
minifyEnabled false
Expand Down

0 comments on commit 56eb5a9

Please sign in to comment.