Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Add section in refdoc about Kotlin #1357

Merged
merged 3 commits into from
Jan 7, 2019
Merged

Add section in refdoc about Kotlin #1357

merged 3 commits into from
Jan 7, 2019

Conversation

dzou
Copy link
Contributor

@dzou dzou commented Jan 3, 2019

This adds a section in the refdoc discussing Kotlin support. Spring Cloud GCP libraries should work out-of-the-box so long as the user's Kotlin project setup is correct.

Making kotlin app more discoverable #1323

artembilan
artembilan previously approved these changes Jan 3, 2019
@codecov-io
Copy link

codecov-io commented Jan 3, 2019

Codecov Report

Merging #1357 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1357      +/-   ##
============================================
+ Coverage     67.86%   67.87%   +<.01%     
- Complexity     1399     1401       +2     
============================================
  Files           203      203              
  Lines          5654     5668      +14     
  Branches        565      565              
============================================
+ Hits           3837     3847      +10     
- Misses         1585     1589       +4     
  Partials        232      232
Flag Coverage Δ Complexity Δ
#integration ? ?
#unittests 67.87% <ø> (ø) 1401 <ø> (+2) ⬆️
Impacted Files Coverage Δ Complexity Δ
.../gcp/autoconfigure/pubsub/GcpPubSubProperties.java 93.93% <0%> (-1.86%) 8% <0%> (ø)
...bsub/core/subscriber/PubSubSubscriberTemplate.java 76.62% <0%> (-0.41%) 23% <0%> (+1%)
...toconfigure/pubsub/GcpPubSubAutoConfiguration.java 89.91% <0%> (+0.35%) 36% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9b96d6...1466b4e. Read the comment docs.

Copy link
Contributor

@meltsufin meltsufin left a comment

Choose a reason for hiding this comment

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

Can we also link to Spring Kotlin refdocs? Thanks!

@@ -0,0 +1,23 @@
== Kotlin Support

Spring Cloud GCP libraries work out-of-the-box and are fully interoperable with Kotlin Spring boot applications.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Spring Cloud GCP libraries work out-of-the-box and are fully interoperable with Kotlin Spring boot applications.
Spring Cloud GCP libraries work out-of-the-box and are fully interoperable with Kotlin Spring Boot applications.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Also created a PR to link back to our kotlin sample from Spring official doc: spring-projects/spring-framework#2070

Copy link
Contributor

@elefeint elefeint left a comment

Choose a reason for hiding this comment

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

looks good, just a phrasing question.

Depending on your application's needs, you may need to augment your build configuration with compiler plugins:

* https://kotlinlang.org/docs/reference/compiler-plugins.html#spring-support[Spring Kotlin Plugin]: Makes your Spring configuration classes/members non-final for convenience.
* https://kotlinlang.org/docs/reference/compiler-plugins.html#jpa-support[Kotlin Spring JPA Plugin]: Enables using JPA in Kotlin Spring applications.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we standardize "Spring Kotlin" vs "Kotlin Spring" for consistency? Grammatically, I think, it makes no difference.

Copy link
Contributor

Choose a reason for hiding this comment

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

According the mentioned doc in the link, it doesn't sound like this JPA plugin requires Spring at all.
So, it isn't going to be legitimate to call it Kotlin Spring JPA at all.

As for the applications concern, I would just call it like Kotlin applications, not mentioning Spring. From one side Spring might be assumed (just from the context of the current doc), from another side no one said that Spring is mandatory when you build Kotlin applications.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good.

@elefeint - Moved to Kotlin Spring for consistency; it appears the spring docs refer to the plugin as "kotlin-spring" so I will standardize around that.

@artembilan - Renamed to Kotlin JPA plugin to be more accurate.

Copy link
Contributor

@ChengyuanZhao ChengyuanZhao left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@dzou dzou merged commit ff0b97f into master Jan 7, 2019
@dzou dzou deleted the kotlin-refdoc branch January 7, 2019 16:56
elefeint pushed a commit that referenced this pull request Jan 7, 2019
Adds section in refdoc describing kotlin support. Contributes to #1323.
elefeint pushed a commit that referenced this pull request Jan 7, 2019
Adds section in refdoc describing kotlin support. Contributes to #1323.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants