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

runtime: support for kotlin runtime #133

Merged
merged 1 commit into from
Sep 27, 2018
Merged

Conversation

lburgazzoli
Copy link
Contributor

No description provided.

Copy link
Member

@nicolaferraro nicolaferraro left a 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.


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)
Copy link
Member

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?

Copy link
Contributor Author

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.

@lburgazzoli lburgazzoli changed the title runtime: initial support for kotlin runtime runtime: support for kotlin runtime Sep 27, 2018
@lburgazzoli
Copy link
Contributor Author

@nicolaferraro can you review it again ?

changes since initial version:

  • we have now a runtime flag to choose between the runtime to use among jvm, groovy, kotlin that defaults to jvm which is also added automatically to every context/integration
  • the platform context core has been renamed to jvm, so there is a default platform context for each runtime
  • `runtime/jvm has been splitted so code specific to groovy, kotlin is now moved it is own project

Copy link
Member

@nicolaferraro nicolaferraro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@nicolaferraro nicolaferraro merged commit 6d9d529 into apache:master Sep 27, 2018
@lburgazzoli lburgazzoli deleted the kotlin branch September 27, 2018 10:47
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.

None yet

3 participants