Contributing Code or Documentation to Micronaut
Finding Issues to Work on
If you are interested in contributing to Micronaut and are looking for issues to work on, take a look at the issues tagged with help wanted.
Micronaut currently requires JDK 8
Micronaut can be imported into IntelliJ IDEA by opening the
Micronaut tests currently require docker to be installed.
To run the tests use
Geb functional tests are ignored unless you specify the geb environment via system property.
To run with Chrome
./gradlew -Dgeb.env=chrome check.
To run with Firefox
./gradlew -Dgeb.env=firefox check.
The documentation sources are located at
To build the documentation run
./gradlew publishGuide or
./gradlew pG then open
To also build the javadocs instead run
Building the CLI
- Clone Micronaut Profiles
- Install micronaut-profiles to Maven Local
micronaut-profiles$ ./gradlew clean publishToMavenLocal
micronaut-core$ ./gradlew cli:fatJar
micronaut-core$ cd cli/build/bin
Working on the code base
If you are working with the IntelliJ IDEA development environment, you can import the project using the Intellij Gradle Tooling ( "File / Import Project" and select the "settings.gradle" file).
To get a local development version of Micronaut working, first run the
Then install SDKman, which is the quickest way to set up a development environment.
Once you have SDKman installed, point SDKman to your local development version of Micronaut.
sdk install micronaut dev /path/to/checkout/cli/build sdk use micronaut dev
Now the "mn" command will be using your development version!
The most important command you will have to run before sending your changes is the check command.
For a successful contribution, all tests should be green!
Creating a pull request
Once you are satisfied with your changes:
- Commit your changes in your local branch
- Push your changes to your remote branch on GitHub
- Send us a pull request
We want to keep the code clean, following good practices about organization, javadoc and style as much as possible.
Micronaut uses Checkstyle to make sure that all the code follows those standards. The configuration file is defined in
config/checkstyle/checkstyle.xml and to execute the Checkstyle you
need to run:
Before start contributing with new code it is recommended to install IntelliJ CheckStyle-IDEA plugin and configure it to use Micronaut's checkstyle configuration file.
IntelliJ will mark in red the issues Checkstyle finds. For example:
In this case, to fix the issues, we need to:
- Add one empty line before
packagein line 16
- Add the Javadoc for the constructor in line 27
- Add an space after
ifin line 34
The plugin also adds a new tab in the bottom to run checkstyle report and see all the errors and warnings. It is recommended to run the report and fixing all the issues before submitting a pull request.
Building on Windows 10
The following prerequisites are needed for building and testing on Windows 10:
- Docker Desktop version 188.8.131.52 win81 build 29211 or higher is installed and running.
- OpenSSL binaries are installed, for example (https://indy.fulgan.com/SSL/) and on the PATH.