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

Commit ff0b97f

Browse files
authored
Add section in refdoc about Kotlin (#1357)
Adds section in refdoc describing kotlin support. Contributes to #1323.
1 parent 6c1f850 commit ff0b97f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docs/src/main/asciidoc/kotlin.adoc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
== Kotlin Support
2+
3+
The latest version of the Spring Framework provides first-class support for Kotlin.
4+
For Kotlin users of Spring, the Spring Cloud GCP libraries work out-of-the-box and are fully interoperable with Kotlin applications.
5+
6+
For more information on building a Spring application in Kotlin, please consult the https://docs.spring.io/spring/docs/current/spring-framework-reference/languages.html#kotlin[Spring Kotlin documentation].
7+
8+
=== Prerequisites
9+
10+
Ensure that your Kotlin application is properly set up.
11+
Based on your build system, you will need to include the correct Kotlin build plugin in your project:
12+
13+
* https://kotlinlang.org/docs/reference/using-maven.html[Kotlin Maven Plugin]
14+
* https://kotlinlang.org/docs/reference/using-gradle.html[Kotlin Gradle Plugin]
15+
16+
Depending on your application's needs, you may need to augment your build configuration with compiler plugins:
17+
18+
* https://kotlinlang.org/docs/reference/compiler-plugins.html#spring-support[Kotlin Spring Plugin]: Makes your Spring configuration classes/members non-final for convenience.
19+
* https://kotlinlang.org/docs/reference/compiler-plugins.html#jpa-support[Kotlin JPA Plugin]: Enables using JPA in Kotlin applications.
20+
21+
Once your Kotlin project is properly configured, the Spring Cloud GCP libraries will work within your application without any additional setup.
22+
23+
== Sample
24+
25+
A https://github.com/spring-cloud/spring-cloud-gcp/tree/master/spring-cloud-gcp-kotlin-samples/spring-cloud-gcp-kotlin-app-sample[Kotlin sample application] is provided to demonstrate a working Maven setup and various Spring Cloud GCP integrations from within Kotlin.
26+

docs/src/main/asciidoc/spring-cloud-gcp.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,5 @@ include::security-iap.adoc[]
5858
include::vision.adoc[]
5959

6060
include::cloudfoundry.adoc[]
61+
62+
include::kotlin.adoc[]

0 commit comments

Comments
 (0)