Replace mode in gradle config not working with arrays
Arturs-E opened this issue · 0 comments
Arturs-E commented
When trying to replace an array value in app/build.gradle file, a new line is added instead of replacing the existing one.
I have a productFlavors
section that i'm looking to update:
productFlavors {
prod {
dimension "environment"
manifestPlaceholders = [displayName:"My App"]
}
}
Replace mode works correctly for primitives, like the applicationIdSuffix
property, however not so with manifestPlaceholders
property, which is an array - instead of replacing the existing array, a new one - equal to the existing one - is created.
trapeze config.yaml file:
platforms:
android:
gradle:
- file: app/build.gradle
target:
android:
productFlavors:
prod:
manifestPlaceholders:
replace:
manifestPlaceholders: = [displayName:"My App"]
Currently it results in the following gradle config:
productFlavors {
prod {
dimension "environment"
manifestPlaceholders = [displayName:"My App"]
manifestPlaceholders = [displayName:"My App"]
}
}
I've tried different configuration variants but nothing really seems to work. Is there something i'm missing in the configuration?