Reputation: 2205
I need to set this
avro {
templateDirectory = "/path/to/velocity/templates"
}
But getting error stating that's it's expecting Property<String>
not a String
.
Not clear on how to set this value as Property<String>
?
Upvotes: 4
Views: 969
Reputation: 15193
If you're using the gradle-avro-plugin, do note that the configuration should be set as below for Kotlin DSL
avro {
templateDirectory.set("/path/to/velocity/templates" as String?)
}
The syntax for all the configurations are as below:
avro {
isCreateSetters.set(true)
isCreateOptionalGetters.set(false)
isGettersReturnOptional.set(false)
fieldVisibility.set("PUBLIC_DEPRECATED")
outputCharacterEncoding.set("UTF-8")
stringType.set("String")
templateDirectory.set(null as String?)
isEnableDecimalLogicalType.set(true)
dateTimeLogicalType.set("JSR310")
}
The reference is here.
Upvotes: 1