-
Notifications
You must be signed in to change notification settings - Fork 3
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
build: define dependencies in version catalog #17
Conversation
3706fb7
to
c2deba0
Compare
|
||
[libraries] | ||
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } | ||
dokkatoo-gradle = { module = "dev.adamko.dokkatoo:dokkatoo-plugin", version = "2.4.0" } |
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.
Out of interest: Why not define all version numbers in the [versions]
section?
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.
You could, but in general I tend only to do this if several dependencies share a common version, to force having them synced versions.
To me this is one layer of indirection more. When I want to see the current version of a dependency I have to do one look more to see the actual version when using version references.
I favor seeing what I want to see as easy as possible, so I try to use version references only when there is a need to do so.
But that's just personal preference I guess, the format itself allows doing what you asked for and I can't find any official recommendations.
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit-jupiter" } | ||
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit-jupiter" } | ||
|
||
#region kgraphql-example |
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.
Would it make sense to separate test dependencies as well?
c2deba0
to
ffb26d1
Compare
kotlinx-coroutines = "1.9.0" | ||
kotlinx-serialization = "1.7.3" | ||
jackson = "2.18.0" | ||
ktor = "2.3.12" |
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.
We could try to use ktor 3.0.0
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.
Yeah 👍 I'll do updates in separate PRs
The version catalog is a Gradle standard feature to define dependency versions in a single source in multi-module projects.
Using a standard features has two major benefits:
Also remove unused third party dependencies from
kgraphql-ktor
.