Skip to content

quarkus run doesn’t work with Gradle Kotlin DSL #48906

@alfonsomunozpomer

Description

@alfonsomunozpomer

Describe the bug

Quarkus CLI can’t run projects that use Kotlin DSL (Quarkus 3.24.3 and Gradle 8.14). Gradle tasks run fine.

$ quarkus create app foobar --gradle-kotlin-dsl
-----------

applying codestarts...
📚 java
🔨 gradle-kotlin-dsl
📦 quarkus
📝 config-properties
🔧 tooling-dockerfiles
🔧 tooling-gradle-wrapper
🚀 rest-codestart

-----------
[SUCCESS] ✅  quarkus project has been successfully generated in:
--> /private/tmp/foobar
-----------
Navigate into this directory and get started: quarkus dev
$ quarkus dev

[Incubating] Problems report is available at: file:///private/tmp/quarkus-3.24.3-with-gradle-8.14-kotlin-dsl/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 2s
10 actionable tasks: 10 executed
Listening for transport dt_socket at address: 5005

__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2025-07-14 09:47:42,777 INFO  [io.quarkus] (Quarkus Main Thread) foobar 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.24.3) started in 0.898s. Listening on: http://localhost:8080

2025-07-14 09:47:42,779 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2025-07-14 09:47:42,779 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, rest, smallrye-context-propagation, vertx]
2025-07-14 09:47:44,454 INFO  [io.quarkus] (Shutdown thread) foobar stopped in 0.016s

--
$ quarkus run
[ERROR] ❗  Unable to build: Unknown action for GRADLE_KOTLIN_DSL

Add the -e/--errors option to get more information about the error. Add the --verbose option to get even more details.

But:

$ ./gradlew quarkusRun
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2025-07-14 09:51:58,555 INFO  [io.quarkus] (main) foobar 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.24.3) started in 0.324s. Listening on: http://0.0.0.0:8080
2025-07-14 09:51:58,557 INFO  [io.quarkus] (main) Profile prod activated. 
2025-07-14 09:51:58,558 INFO  [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx]
<============-> 92% EXECUTING [6s]
> :quarkusRun

There’s a sample repo here: https://github.com/alfonsomunozpomer/quarkus-3.24.3-gradle-8.14-kotlin

Expected behavior

I would expect quarkus run to work as ./gradlew quarkusRun.

Actual behavior

$ quarkus run
[ERROR] ❗  Unable to build: Unknown action for GRADLE_KOTLIN_DSL

Add the -e/--errors option to get more information about the error. Add the --verbose option to get even more details.

But:

$ ./gradlew quarkusRun
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2025-07-14 09:51:58,555 INFO  [io.quarkus] (main) foobar 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.24.3) started in 0.324s. Listening on: http://0.0.0.0:8080
2025-07-14 09:51:58,557 INFO  [io.quarkus] (main) Profile prod activated. 
2025-07-14 09:51:58,558 INFO  [io.quarkus] (main) Installed features: [cdi, rest, smallrye-context-propagation, vertx]
<============-> 92% EXECUTING [6s]
> :quarkusRun

How to Reproduce?

Create an app with --gradle-kotlin-dsl.

Output of uname -a or ver

Darwin Mac 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:33 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8122 arm64

Output of java -version

openjdk version "17.0.15" 2025-04-15
OpenJDK Runtime Environment Temurin-17.0.15+6 (build 17.0.15+6)
OpenJDK 64-Bit Server VM Temurin-17.0.15+6 (build 17.0.15+6, mixed mode, sharing)

Quarkus version or git rev

$ quarkus --version
3.24.3

Build tool (ie. output of mvnw --version or gradlew --version)

$ ./gradlew --version

------------------------------------------------------------
Gradle 8.14
------------------------------------------------------------

Build time:    2025-04-25 09:29:08 UTC
Revision:      34c560e3be961658a6fbcd7170ec2443a228b109

Kotlin:        2.0.21
Groovy:        3.0.24
Ant:           Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM:  17.0.15 (Eclipse Adoptium 17.0.15+6)
Daemon JVM:    /Users/alf/.sdkman/candidates/java/17.0.15-tem (no JDK specified, using current Java home)
OS:            Mac OS X 15.5 aarch64

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions