Import it as a platform and leave the version off every module it manages.
libtmux,
libtmux-jackson and the rest are built against
each other, so one version keeps them together.
io.github.libtmux:libtmux-bom — on Maven Central. It is a platform
and has no API of its own; each module it manages links its reference from its
README.
Contents — Quick start · What it manages · What it leaves out · Support
dependencies {
implementation(platform("io.github.libtmux:libtmux-bom:0.1.0"))
implementation("io.github.libtmux:libtmux") // no version
implementation("io.github.libtmux:libtmux-jackson") // no version
testImplementation("io.github.libtmux:libtmux-junit5") // no version
}Maven
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.libtmux</groupId>
<artifactId>libtmux-bom</artifactId>
<version>0.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>Mixing two releases of these artifacts is the failure a platform exists to prevent, and it is easy to do by hand when three coordinates each carry their own version string.
After adding the platform, the coordinates need no version. If one still does,
the platform is not being imported, most often because platform(...) was
written as an ordinary dependency:
$ ./gradlew dependencies --configuration runtimeClasspathruntimeClasspath
+--- io.github.libtmux:libtmux-bom:0.1.0
| \--- io.github.libtmux:libtmux:0.1.0 (c)
\--- io.github.libtmux:libtmux -> 0.1.0
The -> 0.1.0 on a coordinate you wrote without a version is the
platform doing its job.
libtmux · libtmux-jackson ·
libtmux-junit5 · libtmux-kotlin
· libtmux-mcp ·
libtmux-workspace ·
libtmux-workspace-cli ·
libtmux-scala ·
libtmux-scala-cats ·
libtmux-scala-ox
A test checks that list:
platformCoversEveryPublishedModulefails the build when the set of published artifacts stops matching this one.- The Scala artifacts carry the
_3suffix in their coordinates, as every Scala 3 artifact does.
- An API. A platform has no code; each module links its own reference.
- Mixed releases. One version applies to every module listed above.
- Releases. Releases are numbered
0.1.N, and each release incrementsN. Pin an exact version, not a range: any release may change or remove exported identifiers. - Checked. The version in every install block is held to the version this build publishes.
