Skip to content

Commit 35e41a8

Browse files
committed
Document how to configure the Kotlin version
Closes gh-1280
1 parent b25e6ce commit 35e41a8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

initializr-docs/src/main/asciidoc/configuration-guide.adoc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,25 @@ These dependencies, by default, will be available only for versions of the platf
10991099
`1.3.0.RELEASE` up to `2.0.0.M1` (excluded) and will bring in the `stuff-bom` BOM.
11001100

11011101

1102+
[[howto-kotlin-version-mapping]]
1103+
=== Configure Kotlin version mapping
1104+
By default, the Kotlin version to use is inferred from the metadata.
1105+
The following example shows how to map two versions of Kotlin based on the platform version.
1106+
1107+
[source,yaml,indent=0]
1108+
----
1109+
initializr:
1110+
env:
1111+
kotlin:
1112+
mappings:
1113+
- compatibilityRange: "[2.0.0.RELEASE,2.4.0-M1)"
1114+
version: 1.2
1115+
- compatibilityRange: "2.4.0-M1"
1116+
version: 1.3
1117+
----
1118+
1119+
For a more advanced resolution, consider implementing a `KotlinVersionResolver` bean.
1120+
11021121

11031122
[[howto-platform-version-format]]
11041123
=== Configure platform version format

0 commit comments

Comments
 (0)