Slackbot
08/04/2023, 9:26 PMJavi
08/04/2023, 10:02 PMplatform
It should be great there is a [bom]
table so you can consume them without the platform
functionJoseph Ottinger
08/04/2023, 10:04 PMJoseph Ottinger
08/04/2023, 10:08 PMephemient
08/05/2023, 12:11 AMsame as a normal dependency
[libs]
spring-boot-dependencies = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "spring-boot-dependencies" }
but you need to consume it withplatform
dependencies {
api(platform(libs.spring.boot.dependencies))
}
(I don't use Spring so I don't know if this is actually the right dep)Joseph Ottinger
08/05/2023, 1:37 AMephemient
08/05/2023, 1:59 AMJoseph Ottinger
08/05/2023, 3:35 AMlibrary("testbom", "io.kotest:kotest-bom:5.3.1")
in the catalog { versionCatalog { … } }
block, and I publish it, the downstream consumer can have:
dependencies {
testImplementation(platform(libs.testbom))
… but the dependencies don’t show up in the project. There is no .dependencies
completion (libs.testbom.dependencies
doesn’t work, nor does it work on platform()
). testbom
does complete, the toml
has the library; if I set up a bundle that includes that library, it resolves, too, but the build fails because it can’t convert platform(libs.bundles.testbundle)
to an object of type Dependency
, nor do I see a completion that leads there from the bundle or from the call to platform()
.Joseph Ottinger
08/05/2023, 3:37 AMcatalog
- I do not know. I’m trying to figure this out, and for whatever reason the docs are not enough; I have a feeling that once I know how it works, the docs will be so obvious and only a moron wouldn’t understand, but that’s… pretty common for a lot of documentation, as it turns out.Joseph Ottinger
08/05/2023, 3:37 AMJoseph Ottinger
08/05/2023, 3:38 AMbundle
being part of the mix, but I don’t know how to make a bundle from another platform.ephemient
08/05/2023, 9:13 AMJavi
08/05/2023, 11:51 AMbom
to a configuration, any dependency in that configuration added by you, even with a different version, would be overridden with the version from the bom
so you have to add the bom to the catalog, and all dependencies you need too, as you are going to get the version from the catalog automatically, you don't need to add the version to each one, so you can
[libraries]
foo-bom = { module = "org.example:foo:bom", version = "1.0.0" }
foo-dep = { module = "org.example:foo:dep" }
dependencies {
implementation(platform(libs.foo.bom)
implementation(libs.foo.dep)
}
Joseph Ottinger
08/05/2023, 12:07 PMJavi
08/05/2023, 12:07 PMJoseph Ottinger
08/05/2023, 12:07 PMJavi
08/05/2023, 12:08 PMJavi
08/05/2023, 12:09 PMJoseph Ottinger
08/05/2023, 12:10 PMJavi
08/05/2023, 12:11 PMJoseph Ottinger
08/05/2023, 12:12 PMJavi
08/05/2023, 12:15 PMJoseph Ottinger
08/05/2023, 12:15 PM.withoutVersion()
, include the bom with platform, and include the library by name, and I get the dependency. But that means I am redeclaring the dependencies from the bom, just without version. If the bom version changes, I get to go through and add whatever the new version of the bom includesJavi
08/05/2023, 12:16 PMJavi
08/05/2023, 12:16 PMJoseph Ottinger
08/05/2023, 12:16 PMJoseph Ottinger
08/05/2023, 12:17 PMJavi
08/05/2023, 12:17 PMJoseph Ottinger
08/05/2023, 12:17 PMephemient
08/05/2023, 12:17 PMJoseph Ottinger
08/05/2023, 12:17 PMJoseph Ottinger
08/05/2023, 12:18 PMephemient
08/05/2023, 12:18 PMJoseph Ottinger
08/05/2023, 12:19 PMexternal-bom:1.0
has libs a:1.0
,b:1.0
,c:1.0
,d:1.0
I get to declare all of a,b,c,d manually (and get the versions from the bom); if external-bom:1.1 comes out and adds e
, I get to manually redeclare e except without the versionJavi
08/05/2023, 12:19 PMephemient
08/05/2023, 12:20 PMe
Joseph Ottinger
08/05/2023, 12:20 PMJoseph Ottinger
08/05/2023, 12:20 PMephemient
08/05/2023, 12:20 PMJavi
08/05/2023, 12:21 PMlibs.kotest.bom.declaredDependencies.assertions
Joseph Ottinger
08/05/2023, 12:21 PMdependencies
like was referred to earlier, but ehephemient
08/05/2023, 12:21 PMsettings
)Javi
08/05/2023, 12:22 PMephemient
08/05/2023, 12:22 PMJoseph Ottinger
08/05/2023, 12:22 PMJoseph Ottinger
08/05/2023, 12:22 PMJoseph Ottinger
08/05/2023, 12:23 PMephemient
08/05/2023, 12:24 PMephemient
08/05/2023, 12:24 PMephemient
08/05/2023, 12:24 PMJoseph Ottinger
08/05/2023, 12:25 PMJoseph Ottinger
08/05/2023, 12:26 PMJoseph Ottinger
08/05/2023, 12:26 PMephemient
08/05/2023, 12:27 PMJoseph Ottinger
08/05/2023, 12:28 PMJoseph Ottinger
08/05/2023, 12:28 PMJoseph Ottinger
08/05/2023, 12:29 PMJoseph Ottinger
08/05/2023, 12:29 PMephemient
08/05/2023, 12:32 PMJavi
08/05/2023, 12:34 PMJavi
08/05/2023, 12:34 PMephemient
08/05/2023, 12:34 PMJoseph Ottinger
08/05/2023, 12:36 PMJoseph Ottinger
08/05/2023, 12:36 PMJoseph Ottinger
08/05/2023, 12:37 PMJoseph Ottinger
08/05/2023, 12:37 PMephemient
08/05/2023, 12:38 PMJoseph Ottinger
08/05/2023, 12:38 PMephemient
08/05/2023, 12:38 PMJoseph Ottinger
08/05/2023, 12:39 PMJoseph Ottinger
08/05/2023, 12:39 PMJoseph Ottinger
08/05/2023, 12:40 PMephemient
08/05/2023, 12:42 PMJoseph Ottinger
08/05/2023, 12:42 PMephemient
08/05/2023, 12:43 PMJoseph Ottinger
08/05/2023, 12:43 PMephemient
08/05/2023, 12:43 PMJoseph Ottinger
08/05/2023, 12:43 PMJoseph Ottinger
08/05/2023, 12:43 PMJoseph Ottinger
08/05/2023, 12:44 PM