outfoxx / swiftpoet

Kotlin and Java API for generating .swift source files.
Apache License 2.0
284 stars 27 forks source link

PropertySpec DOES NOT add Modifiers to global properties #53

Closed emilio-ojeda-kr closed 2 years ago

emilio-ojeda-kr commented 2 years ago

Having something like:

PropertySpec.builder(propertyName, STRING, Modifier.PUBLIC)
    .apply {
        this.initializer("\"$propertyValue\"")
    }
    .build()

What produces is:

let PropertyName: String = "property-name"

What is expected:

public let PropertyName: String = "property-name"