I'm trying to auto-generate classes were we create variables like this with KotlinPoet:
class test {
var testObj: CustomObject = CustomObject().apply { custom = "custom" }
}
So far I've tried looking at the PropertySpec in KotlinPoet, but can't find any functions to generate variables while calling apply()
at the end.
Is this even possible?