Skip to content

Commit 0bde5fd

Browse files
Sebastiaan Fernandezwilkinsona
authored andcommitted
Add note about Kotlin main class name
See gh-23418
1 parent a8c179e commit 0bde5fd

File tree

1 file changed

+5
-0
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc

1 file changed

+5
-0
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ include::../gradle/packaging/boot-jar-manifest-main-class.gradle[tags=main-class
154154
include::../gradle/packaging/boot-jar-manifest-main-class.gradle.kts[tags=main-class]
155155
----
156156

157+
NOTE: Although the use of Kotlin is demonstrated in some examples above, a main class written in Java is assumed.
158+
If however the main class is written in Kotlin, the name of the generated Java class should be used.
159+
By default, this is the name of the Kotlin class with the `Kt` suffix added.
160+
For example: `ExampleApplication` becomes `ExampleApplicationKt`.
161+
(If another name is defined using the `@JvmName` annotation, then that name should be used.)
157162

158163
[[packaging-executable-configuring-excluding-devtools]]
159164
==== Excluding Devtools

0 commit comments

Comments
 (0)