Updated on 2026-08-14
This commit is contained in:
parent
c6578aa652
commit
692c6514fc
2 changed files with 10 additions and 16 deletions
|
|
@ -73,14 +73,9 @@ object EnvironmentConfigGenerator {
|
|||
when {
|
||||
value.isString -> {
|
||||
val stringValue = value.content
|
||||
val isNullable = stringValue.isEmpty()
|
||||
val propertySpec = PropertySpec.builder(name, STRING.copy(nullable = isNullable))
|
||||
.initializer(if (isNullable) "null" else "%S", stringValue)
|
||||
|
||||
// Add const modifier for non-nullable strings
|
||||
if (!isNullable) {
|
||||
propertySpec.addModifiers(KModifier.CONST)
|
||||
}
|
||||
val propertySpec = PropertySpec.builder(name, STRING)
|
||||
.addModifiers(KModifier.CONST)
|
||||
.initializer("%S", stringValue)
|
||||
|
||||
builder.addProperty(propertySpec.build())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue