Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an option to render Kotlin functions with suspend modifier #1377

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

thevietto
Copy link
Contributor


Description

Added a configuration option for Kotlin generator to render functions with suspend modifier:

when disabled:

fun sayHello(): String

when enabled:

suspend fun sayHello(): String

I know this could be solved by providing a custom Freemarker template to the config, but it seems like supporting Kotlin coroutines is something one would expect to get out of the box.


Changes were made to:

  • Codegen library - Java
  • Codegen library - Kotlin
  • Codegen library - Scala
  • Maven plugin
  • Gradle plugin
  • SBT plugin

@jxnu-liguobin
Copy link
Collaborator

It looks good, looking forward to you completing it. By the way. SBT cannot compile kotlin by default unless using third-party plugins. So you don't need to consider SBT. And I am considering removing the code related to kotlin from the sbt plugin in this library.

@thevietto
Copy link
Contributor Author

It looks good, looking forward to you completing it. By the way. SBT cannot compile kotlin by default unless using third-party plugins. So you don't need to consider SBT. And I am considering removing the code related to kotlin from the sbt plugin in this library.

thanks! Yeah I didn't touch the SBT module
codestyle is fixed, should be good now

@kobylynskyi
Copy link
Owner

Looks good! Thanks for the contribution.

@kobylynskyi kobylynskyi merged commit b76c49b into kobylynskyi:main Nov 9, 2023
@kobylynskyi kobylynskyi added this to the 5.9.0 milestone Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants