-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to not automatically add BOM #701
Conversation
This option has (at least) a couple use cases: 1. the issue described in #681, when a user wants to drive the Micronaut version from a catalog, or directly in their dependencies (although this is probably redundant with #694) 2. we use the Gradle plugins in our module builds, where it's going to look for the platform BOM, which is not necessarily what we want, since we want to use local versions of projects and possibly override transitive versions Closes #681
Here's an example of how a Micronaut module build can be adapted to use this flag, on diff --git a/buildSrc/src/main/groovy/io.micronaut.build.internal.rabbitmq-examples.gradle b/buildSrc/src/main/groovy/io.micronaut.build.internal.rabbitmq-examples.gradle
index d632e272..97e7fcfe 100644
--- a/buildSrc/src/main/groovy/io.micronaut.build.internal.rabbitmq-examples.gradle
+++ b/buildSrc/src/main/groovy/io.micronaut.build.internal.rabbitmq-examples.gradle
@@ -5,6 +5,9 @@ plugins {
}
dependencies {
+ micronautBoms(platform(mn.micronaut.core.bom))
+ micronautBoms(platform(mnTest.micronaut.test.bom))
+ micronautBoms(platform(mnTestResources.micronaut.test.resources.bom))
testImplementation projects.micronautRabbitmq
testImplementation mn.reactor
testImplementation mnSerde.micronaut.serde.support
@@ -18,7 +21,8 @@ configurations.all {
}
}
micronaut {
- version libs.versions.micronaut.platform.get()
+ importMicronautPlatform = false
+ //version libs.versions.micronaut.platform.get()
testRuntime "junit5"
testResources {
clientTimeout = 300
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index b421ff91..cd10d545 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,8 +1,9 @@
[versions]
micronaut-docs = '2.0.0'
micronaut = '4.0.0-M2'
-micronaut-platform = '4.0.0-M1'
+#micronaut-platform = '4.0.0-M1'
micronaut-test = '4.0.0-M1'
+micronaut-test-resources = '2.0.0-M1'
micronaut-gradle-plugin = "4.0.0-M1"
groovy = '4.0.10'
spock = '2.3-groovy-4.0'
@@ -36,6 +37,7 @@ testcontainers-spock = { module = 'org.testcontainers:spock', version.ref = 'tes
micronaut-micrometer = { module = "io.micronaut.micrometer:micronaut-micrometer-bom", version.ref = "micronaut-micrometer" }
micronaut-serde = { module = "io.micronaut.serde:micronaut-serde-bom", version.ref = "micronaut-serde" }
+micronaut-test-resources = { module = "io.micronaut.testresources:micronaut-test-resources-bom", version.ref = "micronaut-test-resources" }
gradle-micronaut = { module = "io.micronaut.gradle:micronaut-gradle-plugin", version.ref = "micronaut-gradle-plugin" }
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
gradle-kotlin-allopen = { module = "org.jetbrains.kotlin:kotlin-allopen", version.ref = "kotlin" }
diff --git a/settings.gradle b/settings.gradle
index 4dbb2206..881afc18 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -26,4 +26,5 @@ micronautBuild {
importMicronautCatalog()
importMicronautCatalog("micronaut-micrometer")
importMicronautCatalog("micronaut-serde")
+ importMicronautCatalog("micronaut-test-resources")
} Basically, the |
Kudos, SonarCloud Quality Gate passed! |
This option has (at least) a couple use cases:
the issue described in Make it possible to allow users to define the Micronaut BOM (in order to achieve centralized version management) #681, when a user wants to drive the Micronaut version from a catalog, or directly in their dependencies (although this is probably redundant with Add a plugin to import the Micronaut Platform catalog #694)
we use the Gradle plugins in our module builds, where it's going to look for the platform BOM, which is not necessarily what we want, since we want to use local versions of projects and possibly override transitive versions
Closes #681