-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Migrate to version catalog and add a BOM (#233)
Supersedes #228 Co-authored-by: Alexey Zhokhov <[email protected]>
- Loading branch information
Showing
7 changed files
with
120 additions
and
65 deletions.
There are no files selected for viewing
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,82 @@ | ||
# Contributing Code or Documentation to Micronaut | ||
|
||
Sign the [Contributor License Agreement (CLA)](https://cla-assistant.io/micronaut-projects/micronaut-acme). This is required before any of your code or pull-requests are accepted. | ||
|
||
## 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](https://github.com/micronaut-projects/micronaut-acme/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+help+wanted%22). | ||
|
||
## JDK Setup | ||
|
||
Micronaut ACME currently requires JDK 8. | ||
|
||
## IDE Setup | ||
|
||
Micronaut ACME can be imported into IntelliJ IDEA by opening the `build.gradle` file. | ||
|
||
## Docker Setup | ||
|
||
Micronaut ACME tests currently require Docker to be installed. | ||
|
||
## Running Tests | ||
|
||
To run the tests, use `./gradlew check`. | ||
|
||
## Building Documentation | ||
|
||
The documentation sources are located at `src/main/docs/guide`. | ||
|
||
To build the documentation, run `./gradlew publishGuide` (or `./gradlew pG`), then open `build/docs/index.html` | ||
|
||
To also build the Javadocs, run `./gradlew docs`. | ||
|
||
## Working on the code base | ||
|
||
If you use IntelliJ IDEA, you can import the project using the Intellij Gradle Tooling ("File / Import Project" and selecting the "settings.gradle" file). | ||
|
||
To get a local development version of Micronaut ACME working, first run the `publishToMavenLocal` task. | ||
|
||
``` | ||
./gradlew pTML | ||
``` | ||
|
||
You can then reference the version specified with `projectVersion` in `gradle.properties` in a test project's `build.gradle` or `pom.xml`. If you use Gradle, add the `mavenLocal` repository (Maven automatically does this): | ||
|
||
``` | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
``` | ||
|
||
## 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](https://help.github.com/articles/creating-a-pull-request) | ||
|
||
## Checkstyle | ||
|
||
We want to keep the code clean, following good practices about organization, Javadoc, and style as much as possible. | ||
|
||
Micronaut ACME uses [Checkstyle](https://checkstyle.sourceforge.io/) to make sure that the code follows those standards. The configuration is defined in `config/checkstyle/checkstyle.xml`. To execute Checkstyle, run: | ||
|
||
``` | ||
./gradlew <module-name>:checkstyleMain | ||
``` | ||
|
||
Before starting to contribute new code we recommended that you install the IntelliJ [CheckStyle-IDEA](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) plugin and configure it to use Micronaut's checkstyle configuration file. | ||
|
||
IntelliJ will mark in red the issues Checkstyle finds. For example: | ||
|
||
![](https://github.com/micronaut-projects/micronaut-core/raw/master/src/main/docs/resources/img/checkstyle-issue.png) | ||
|
||
In this case, to fix the issues, we need to: | ||
|
||
- Add one empty line before `package` in line 16 | ||
- Add the Javadoc for the constructor in line 27 | ||
- Add an space after `if` in line 34 | ||
|
||
The plugin also adds a new tab in the bottom of the IDE to run Checkstyle and show errors and warnings. We recommend that you run the report and fix all issues before submitting a pull request. |
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,3 @@ | ||
plugins { | ||
id "io.micronaut.build.internal.bom" | ||
} |
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 |
---|---|---|
@@ -1,44 +1,17 @@ | ||
plugins { | ||
id "io.micronaut.build.internal.module" | ||
} | ||
|
||
configurations { | ||
documentation | ||
id 'io.micronaut.build.internal.module' | ||
} | ||
|
||
dependencies { | ||
annotationProcessor("io.micronaut:micronaut-inject-java") | ||
annotationProcessor "io.micronaut.docs:micronaut-docs-asciidoc-config-props:$micronautDocsVersion" | ||
|
||
implementation("io.micronaut:micronaut-http") | ||
implementation("io.micronaut:micronaut-http-server") | ||
implementation("io.micronaut:micronaut-http-server-netty") | ||
implementation("io.micronaut:micronaut-inject") | ||
implementation 'jakarta.inject:jakarta.inject-api:2.0.1' | ||
|
||
implementation "org.shredzone.acme4j:acme4j-client:${acmeVersion}" | ||
implementation "org.shredzone.acme4j:acme4j-utils:${acmeVersion}" | ||
|
||
implementation "io.netty:netty-tcnative-boringssl-static:$tcnativeBoringsslStatic" | ||
|
||
documentation "org.codehaus.groovy:groovy-templates:${groovyVersion}" | ||
documentation "org.codehaus.groovy:groovy-dateutil:${groovyVersion}" | ||
|
||
testImplementation "org.testcontainers:spock:1.16.3" | ||
testImplementation("io.micronaut:micronaut-http-client") | ||
testImplementation("org.codehaus.groovy:groovy-dateutil:$groovyVersion") | ||
testImplementation("org.codehaus.groovy:groovy-json:$groovyVersion") | ||
testImplementation("org.spockframework:spock-core:${spockVersion}") { | ||
exclude module:'groovy-all' | ||
} | ||
testImplementation "cglib:cglib-nodep:${cglibVersion}" | ||
testImplementation "io.micronaut:micronaut-inject-groovy" | ||
testImplementation "io.micronaut.test:micronaut-test-spock:${micronautTestVersion}" | ||
testImplementation "org.codehaus.groovy:groovy-test:${groovyVersion}" | ||
testImplementation "org.objenesis:objenesis:${objenesisVersion}" | ||
testRuntimeOnly "ch.qos.logback:logback-classic:${logbackClassicVersion}" | ||
} | ||
|
||
groovydoc { | ||
classpath += project.configurations.documentation | ||
implementation libs.micronaut.http | ||
implementation libs.micronaut.http.server | ||
implementation libs.micronaut.http.server.netty | ||
implementation libs.managed.acme4j.client | ||
implementation libs.managed.acme4j.utils | ||
implementation libs.netty.tcnative.boringssl.static | ||
|
||
testImplementation libs.testcontainers.spock | ||
testImplementation libs.groovy.json | ||
testImplementation libs.groovy.dateutil | ||
testImplementation libs.micronaut.http.client | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[versions] | ||
managed-acme4j = "2.12" | ||
|
||
[libraries] | ||
managed-acme4j-client = { module = 'org.shredzone.acme4j:acme4j-client', version.ref = 'managed-acme4j' } | ||
managed-acme4j-utils = { module = 'org.shredzone.acme4j:acme4j-utils', version.ref = 'managed-acme4j' } | ||
|
||
micronaut-http = { module = 'io.micronaut:micronaut-http' } | ||
micronaut-http-server = { module = 'io.micronaut:micronaut-http-server' } | ||
micronaut-http-server-netty = { module = 'io.micronaut:micronaut-http-server-netty' } | ||
micronaut-http-client = { module = 'io.micronaut:micronaut-http-client' } | ||
|
||
graal = { module = "org.graalvm.nativeimage:svm" } | ||
netty-tcnative-boringssl-static = { module = 'io.netty:netty-tcnative-boringssl-static' } | ||
testcontainers-spock = { module = 'org.testcontainers:spock' } | ||
|
||
groovy-json = { module = 'org.codehaus.groovy:groovy-json' } | ||
groovy-dateutil = { module = 'org.codehaus.groovy:groovy-dateutil' } |
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