Skip to content

Files

gradle

Quarkus Gradle Support

Gradle plugins for building Quarkus applications and building Quarkus extensions.

Develop

Before starting development on these plugins, be sure to have built the project.

For IntelliJ users, see the notes for importing the project.

Be sure to see the notes about testing your changes.

Building

Generally, after each pull or rebase the entire project should be built:

./mvnw -Dquickly

This builds the entire Quarkus codebase and publishes everything to mavenLocal.

From there, this project works like any normal Gradle build. Run Gradle commands here or any of the subprojects.

However, see the important notes about testing.

Running Tests

Each subproject defines its own set of tests which can just be run using normal Gradle operations.

There are also integration tests located in integration-tests/gradle.

Important

Before running integration tests, it is important that the entire Quarkus codebase be built and published into mavenLocal.

To run the integration tests, from the integration-tests/gradle directory:

./mvnw test

A single integration test can be run by itself:

./mvnw test -Dtest=<test-class-name>
Note

See Alternative Testing for an alternative approach to integration testing.

Importing using Intellij

Disable "Maven Auto Import" for the Quarkus projects. Since the Gradle plugin has a pom.xml, IntelliJ will configure this project as a Maven project. You need to configure it to be a Gradle project. To do so, follow these instructions:

  1. Go to File -> Project Structure

  2. In Modules, remove the quarkus-gradle-plugin and re-import as a Gradle project.

Alternative Testing

Another option for testing the plugin is to create a local project that uses the plugin and the features you are working on.

Again, be sure the entire project is built, then run the following:

    mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create \
        -DprojectGroupId=${groupName} \
        -DprojectArtifactId=${name} \
        -DclassName="org.acme.quickstart.GreetingResource" \
        -DplatformArtifactId=quarkus-bom \
        -Dpath="/hello" \
        -DbuildTool=gradle

Follow the instructions in the Gradle Tooling Guide for more information about the available commands.