-
Notifications
You must be signed in to change notification settings - Fork 352
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
runtime: support for kotlin runtime #133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds really nice!
Can you also add in the doc that we also support Kotlin?
Only comment is for the kamel:
prefix. Should we better use that name only for the client tool? I think we can use the runtime:
prefix for runtime dependencies.
runtime/examples/routes.kts
Outdated
|
||
val rnd = java.util.Random() | ||
val builder = bindings["builder"] as org.apache.camel.builder.RouteBuilder | ||
fun from(uri: String): org.apache.camel.model.RouteDefinition = builder.from(uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can implicitly add those (and other) lines in the future. Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment the kotlin implementation for the jsr 223 does not allow to provide global scoped objects and we need to get them through the bindings
map. With kotlin 1.3 there will be a better support for scripting so there is a change those lines won't be needed any more.
I've also asked kotlin people to give some advice about providing global bindingsso I'll update this as soon as I have some feedback.
@nicolaferraro can you review it again ? changes since initial version:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!
No description provided.