Kotlin: Add option to add defaults to nullable fields#863
Conversation
|
Welcome, it looks good, Let's wait until the test passes. 👍🏻 |
|
@jxnu-liguobin a bit confused as to why that build's failing, all of the constants seem to be in the right place, am I missing something ? Edit: Oh, I think I've got it, there's a version dependency there. It's not pulling the library from the project, it's pulling from the published project, so I need to land the change to the library before I can change the plugin 😢 |
|
@zmack please change the target branch to develop (according to CONTRIBUTING.md#development-process) |
a49128a to
8710bb6
Compare
Oh welp, apologies, I totally missed that. Updated the target branch and rebased and that took care of all my testing woes 🥳 |
|
@kobylynskyi is the sonar report failure due to one of my changes or unrelated? |
|
Nope, that's because Sonar run is not supported in PRs. You are good. |
|
Sorry for necroposting, but do you intentionally not add default null in parameterized input template because of something, or this is a bug? |
Description
This adds the option to have kotlin classes generated with constructors that set the default value of nullable types set to null.
This would end up generating classes to the tune of
rather than
This ends up being convenient in Kotlin as it makes using constructors more terse and to some degree obviates the need for generating builders.
Please let me know if I missed adding anything here.
Thank you.
Changes were made to: