Generate null MapTiler BuildConfig values when not provided

Remove the default values from the Gradle file, the public MapTiler defaults
are now only defined in MapTilerDefaults. buildConfigFieldStr now accepts a
null value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benoit Marty
2026-10-14 10:11:08 +02:00
parent 0149e6f65b
commit 799f60b955
4 changed files with 20 additions and 24 deletions
@@ -10,14 +10,17 @@ package extension
import com.android.build.api.dsl.VariantDimension
/**
* Adds a String field to the generated BuildConfig class. If [value] is null, the field will be null.
*/
fun VariantDimension.buildConfigFieldStr(
name: String,
value: String,
value: String?,
) {
buildConfigField(
type = "String",
name = name,
value = "\"$value\""
value = value?.let { "\"$it\"" } ?: "null"
)
}