forked from micronaut-projects/micronaut-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work to modernize the Gradle build (micronaut-projects#6067)
* Remove unused variables * Introduce a version catalog This commit replaces the "dependencyVersion" and "dependencyModuleVersion" calls with Gradle's version catalogs. In the process, I tried to clarify what belongs to the BOM (as "managed" dependencies") vs what is not. Currently this breaks BOM verification module, this will be fixed in another commit. It will also probably break the automatic upgrading of dependencies. However, the result is much cleaner: there are no duplicate coordinates anymore in build files. * Publish a version catalog alongside the BOM This commit introduces a new artifact published alongside the BOM: a Gradle _version catalog_. A version catalog is not a replacement for a BOM. It can be seen as an alternative, or a complement to a BOM file. For example, a user can import the Micronaut version catalog in their settings file by doing: ```gradle dependencyResolutionManagement { versionCatalogs { create("mn") { from("io.micronaut:micronaut-bom:3.0.1-SNAPSHOT") } } } ``` Gradle will then generate _version accessors_, which allows replacing dependency notations from: ```gradle implementation "ch.qos.logback:logback-classic" ``` to: ```gradle implementation mn.logback ``` Those accessors are _type safe_. Version catalogs should really be seen as "recommendations". Without applying a BOM in addition, the versions declared in a catalog have _no impact_ on dependency resolution. Therefore, it is often recommended to apply both the BOM _and_ use catalogs to declare dependencies. It comes with an advantage, which is that versions declared in the BOM can be overridden by the user: ```gradle dependencyResolutionManagement { versionCatalogs { create("mn") { from("io.micronaut:micronaut-bom:3.0.1-SNAPSHOT") version("snakeyaml") { strictly("1.28") } } } } ``` * Workaround JSON ordering issue under JDK 15 on CI * Integrate Jackson to the BOM It looks like it was a mistake that it wasn't present in the BOM already.
- Loading branch information
Showing
52 changed files
with
1,320 additions
and
1,311 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ target/ | |
.gradle/ | ||
.idea/ | ||
build/ | ||
!buildSrc/src/main/groovy/io/micronaut/build/ | ||
classes/ | ||
out/ | ||
*.db | ||
|
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
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
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,7 +1,7 @@ | ||
dependencies { | ||
api project(":core") | ||
api project(":inject") | ||
api dependencyModuleVersion("netty", "netty-buffer") | ||
api libs.managed.netty.buffer | ||
|
||
annotationProcessor project(":inject-java") | ||
} | ||
} |
Oops, something went wrong.