appendix A Alternative languages and build tooling

 

We decided to choose both Java and Maven as the most utilized JVM programming language and build tool, respectively. However, Quarkus has a large user base that prefers Kotlin and Gradle. In this appendix, we detail how you can set up and use them both with your Quarkus applications.

A.1 Gradle

Gradle is utilized in a very similar way to the Quarkus Maven plugin. All operations are just mapped to Gradle tasks.

A.1.1 Creating Quarkus Gradle projects

We can create a Quarkus application project based on Gradle in three ways: the quarkus CLI, the Quarkus Maven plugin, and the graphical starter interface (https://code.quarkus.io).

Creating Gradle applications with the Quarkus CLI

We only need to specify the --gradle flag when we generate the project:

$ quarkus create app org.acme:quarkus-gradle --gradle

Creating Gradle applications with the Maven plugin

Gradle doesn’t provide a way to generate a project from the command line as Maven does. But we can utilize the same Quarkus Maven plugin with the full GAV to also generate Gradle projects:

$ mvn io.quarkus.platform:quarkus-maven-plugin:3.15.1:create \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=quarkus-gradle \
    -DbuildTool=gradle

Creating Gradle applications with code.quarkus.io

Simply choose Gradle in the Build Tool menu, as shown in figure A.1.

Figure A.1 code.quarkus.io Gradle build tool
figure

A.1.2 Quarkus with Gradle

A.2 Kotlin

A.2.1 Kotlin allOpen

A.2.2 Kotlin coroutines

A.3 Other languages