From 0bde5fda9b9026bef6917628c5c206d878974af2 Mon Sep 17 00:00:00 2001 From: Sebastiaan Fernandez Date: Sun, 20 Sep 2020 21:18:25 +0200 Subject: [PATCH 1/2] Add note about Kotlin main class name See gh-23418 --- .../src/main/asciidoc/packaging.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc index 8a76e0a512..a30d7984e0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc @@ -154,6 +154,11 @@ include::../gradle/packaging/boot-jar-manifest-main-class.gradle[tags=main-class include::../gradle/packaging/boot-jar-manifest-main-class.gradle.kts[tags=main-class] ---- +NOTE: Although the use of Kotlin is demonstrated in some examples above, a main class written in Java is assumed. +If however the main class is written in Kotlin, the name of the generated Java class should be used. +By default, this is the name of the Kotlin class with the `Kt` suffix added. +For example: `ExampleApplication` becomes `ExampleApplicationKt`. +(If another name is defined using the `@JvmName` annotation, then that name should be used.) [[packaging-executable-configuring-excluding-devtools]] ==== Excluding Devtools From 360e29af4852765e3736d23eb26de52b0e509e75 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 21 Sep 2020 10:40:29 +0100 Subject: [PATCH 2/2] Polish "Add note about Kotlin main class name" See gh-23418 --- .../src/main/asciidoc/packaging.adoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc index a30d7984e0..094e5e1a23 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc @@ -154,11 +154,10 @@ include::../gradle/packaging/boot-jar-manifest-main-class.gradle[tags=main-class include::../gradle/packaging/boot-jar-manifest-main-class.gradle.kts[tags=main-class] ---- -NOTE: Although the use of Kotlin is demonstrated in some examples above, a main class written in Java is assumed. -If however the main class is written in Kotlin, the name of the generated Java class should be used. +NOTE: If the main class is written in Kotlin, the name of the generated Java class should be used. By default, this is the name of the Kotlin class with the `Kt` suffix added. -For example: `ExampleApplication` becomes `ExampleApplicationKt`. -(If another name is defined using the `@JvmName` annotation, then that name should be used.) +For example, `ExampleApplication` becomes `ExampleApplicationKt`. +If another name is defined using `@JvmName` then that name should be used. [[packaging-executable-configuring-excluding-devtools]] ==== Excluding Devtools