-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix combination of @QuarkusMain and Kotlin native application
Fixes: #29754
- Loading branch information
Showing
5 changed files
with
62 additions
and
8 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
core/deployment/src/main/java/io/quarkus/deployment/steps/KotlinUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.quarkus.deployment.steps; | ||
|
||
import org.jboss.jandex.ClassInfo; | ||
import org.jboss.jandex.DotName; | ||
|
||
final class KotlinUtil { | ||
|
||
private static final DotName KOTLIN_METADATA_ANNOTATION = DotName.createSimple("kotlin.Metadata"); | ||
|
||
private KotlinUtil() { | ||
} | ||
|
||
static boolean isKotlinClass(ClassInfo classInfo) { | ||
return classInfo.hasDeclaredAnnotation(KOTLIN_METADATA_ANNOTATION); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...on-tests/kotlin-serialization/src/main/kotlin/io/quarkus/it/kotser/GreetingApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.quarkus.it.kotser | ||
|
||
import io.quarkus.runtime.Quarkus.run | ||
import io.quarkus.runtime.annotations.QuarkusMain | ||
|
||
@QuarkusMain | ||
class GreetingApplication | ||
|
||
fun main(args: Array<String>) { | ||
run(*args) | ||
} |
15 changes: 15 additions & 0 deletions
15
...in/standard/src/main/kotlin/io/quarkus/it/resteasy/reactive/kotlin/GreetingApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.quarkus.it.resteasy.reactive.kotlin | ||
|
||
import io.quarkus.runtime.Quarkus.run | ||
import io.quarkus.runtime.annotations.QuarkusMain | ||
|
||
@QuarkusMain | ||
class GreetingApplication { | ||
|
||
companion object { | ||
@JvmStatic | ||
fun main(args: Array<String>) { | ||
run(*args) | ||
} | ||
} | ||
} |