Skip to content

Commit

Permalink
Rework BOM as core BOM (#8299)
Browse files Browse the repository at this point in the history
* Remove dependencies which are not directly used

This commit removes from the core BOM all managed dependencies which
are not directly used in build scripts. This basically means that
those dependencies are only present so that precisely we can have them
in the BOM. Now that the BOM is extracted in its own project, they are
redundant.

* Remove managed libraries which are not used

This commit moves a number of libraries from the managed scope to unmanaged.
The only dependencies which are managed are now the ones which are in api
or implementation scope.

Those dependencies were previously in the BOM, but won't be directly managed
by core. This means a couple of things:

1. the new BOM will have to duplicate those dependencies, in order to manage
them
2. the dependencies will have to be copied in the new BOM (because they are
not present in the core BOM anymore, they won't be inlined like the other
managed dependencies)

* Rename `bom` -> `core-bom`

This is a breaking change: it renames the `bom` project to `core-bom`.
The new BOM will live in a separate project (`micronaut-bom`) under
different GAV coordinates.

* Reintroduce missing BOMs

* Fix Groovy BOM coordinates

* Update groovy-test coordinates

* Restore entries for inject-xxx in core BOM

* Revert "Update groovy-test coordinates"

This reverts commit b376b79.
  • Loading branch information
melix authored Nov 15, 2022
1 parent a75bff9 commit 950ade6
Show file tree
Hide file tree
Showing 31 changed files with 155 additions and 414 deletions.
77 changes: 0 additions & 77 deletions bom/build.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion buffer-netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies {
api project(":core")
api project(":inject")
api libs.managed.netty.buffer
compileOnly libs.managed.graal
compileOnly libs.graal

annotationProcessor project(":inject-java")
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ dependencies {

testImplementation libs.caffeine
testImplementation libs.managed.groovy
testImplementation(libs.managed.spock) {
testImplementation(libs.spock) {
exclude module: 'groovy-all'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void usesMicronautTestKotest() {

private void addTestImplementationDependency(String lib) {
dependencyHandler.addProvider("testImplementation", libs.findLibrary(
"managed.micronaut.test." + lib
"micronaut.test." + lib
).get(), DefaultMicronautCoreExtension::excludeMicronautLibs);
}

Expand Down
2 changes: 1 addition & 1 deletion context/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
compileOnly project(':core-reactive')
compileOnly project(':core-processor')
compileOnly libs.log4j
compileOnly libs.managed.logback
compileOnly libs.logback

testCompileOnly project(":inject-groovy")
testAnnotationProcessor project(":inject-java")
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions core-bom/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
id 'io.micronaut.build.internal.bom'
}

group projectGroupId
version projectVersion

micronautBom {
extraExcludedProjects = [
"benchmarks",
"inject-test-utils"
]
propertyName = 'core'
}

micronautBuild {
binaryCompatibility {
def (major, minor, patch) = (version - '-SNAPSHOT').split('[.]').collect { it.toInteger() }
enabled = major > 4 || (major == 4 && minor > 0) || (major == 4 && minor == 0 && patch > 0)
}
}
3 changes: 1 addition & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ micronautBuild {

dependencies {
compileOnly libs.managed.jakarta.annotation.api
compileOnly libs.managed.graal
compileOnly libs.graal
compileOnly libs.kotlin.stdlib
}

Expand Down Expand Up @@ -43,4 +43,3 @@ tasks.withType(JapicmpTask).configureEach {
addViolationTransformer(RemovedPackages, [prefixes: ['io.micronaut.caffeine'], exact: []])
}
}

Loading

0 comments on commit 950ade6

Please sign in to comment.