-
Notifications
You must be signed in to change notification settings - Fork 0
Bump dependencies, introduce BomsPlugin
#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
Conversation
... to include such things as `kotlinCompilerBlahBlahBlah`.
# Conflicts: # build.gradle.kts # buildSrc/src/main/kotlin/io/spine/dependency/boms/Boms.kt # buildSrc/src/main/kotlin/io/spine/dependency/boms/BomsPlugin.kt # buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt # buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt # buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoData.kt # buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt # buildSrc/src/main/kotlin/io/spine/gradle/publish/PublicationHandler.kt # buildSrc/src/main/kotlin/jvm-module.gradle.kts # buildSrc/src/main/kotlin/module-testing.gradle.kts
Why isn't it forced by `BomsPlugin` is still to find out.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #44 +/- ##
=========================================
Coverage 94.18% 94.18%
Complexity 76 76
=========================================
Files 13 13
Lines 275 275
Branches 26 26
=========================================
Hits 259 259
Misses 12 12
Partials 4 4 🚀 New features to boost your workflow:
|
Also: * Improve documentation. * Remove `Logging.lib` implementation dependency in `jvm-module`. Let each module decide by itself on this heavy dependency.
BomsPlugin
@armiol, we can probably rename the package to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some comments to consider.
build.gradle.kts
Outdated
apply(plugin = "io.spine.mc-java") | ||
|
||
apply<IncrementGuard>() | ||
apply<VersionWriter>() | ||
|
||
apply<BomsPlugin>() | ||
|
||
apply(from = "$projectDir/version.gradle.kts") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They can be grouped:
apply {
plugin("io.spine.mc-java)
plugin<IncrementGuard>()
plugin<VersionWriter>()
plugin<BomsPlugin>()
from("$projectDir/version.gradle.kts")
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can, but I'd rather not to. The order of applying the plugins and their semantics are a bit different. Also, plugin { id("blah") }
and apply { plugin("blah") }
work differently regarding DSL appearing in the build script.
With Gradle, it's usually "don't touch when it works". So, let's move with new things gradually.
build.gradle.kts
Outdated
apply(plugin = "io.spine.mc-java") | ||
|
||
apply<IncrementGuard>() | ||
apply<VersionWriter>() | ||
|
||
apply<BomsPlugin>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can go without Plugin
suffix? Other local plugins don't use it.
It can be BonEnforcer
or BomAlignment
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an experiment in progress. It's not enforcing BOM already. Let's see how it goes and then select the name. We've got a lot of code around the dependencies.
There's Boms
object, BTW. So, the plugin has to have the suffix.
* This one should be forced in a project via: | ||
* | ||
* ```kotlin | ||
* dependencies { | ||
* testImplementation(enforcedPlatform(JUnit.bom)) | ||
* } | ||
* ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, this piece of docs is no longer relevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the reference to BomsPlugin
.
This PR builds the
base-types
module with latest dependency versions via pulling the latestconfig
.The PR also initiates adoption of the Maven BOM mechanism for forcing the dependencies in a more consolidated and controllable way, which is described in the section below.
BomsPlugin
This PR introduces the
io.spine.dependency.boms
package underbuildSrc
. The package provides:Boms
— theobject
which lists major platforms that we use.BomsPlugin
— a Gradle project plugin which enforces the versions ofBoms
platforms in a project to which it is applied.Other notable changes
Kotlin
dependency object gotStdLib
nested object to simplify forcing thestdlib
artifacts.3.25.7
, which is the latest version in the3.x
family.