Skip to content

Commit d15cd98

Browse files
committed
#35 update readme
1 parent be411a2 commit d15cd98

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,41 @@ The version of the binaries can be managed by importing `embedded-postgres-binar
277277
</dependencyManagement>
278278
```
279279

280+
<details>
281+
<summary>Using Maven BOMs in Gradle</summary>
282+
283+
In Gradle, there are several ways how to import a Maven BOM.
284+
285+
1. You can define a resolution strategy to check and change the version of transitive dependencies manually:
286+
287+
configurations.all {
288+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
289+
if (details.requested.group == 'io.zonky.test.postgres') {
290+
details.useVersion '11.1.0'
291+
}
292+
}
293+
}
294+
295+
2. If you use Gradle 5+, [Maven BOMs are supported out of the box](https://docs.gradle.org/current/userguide/managing_transitive_dependencies.html#sec:bom_import), so you can import the bom:
296+
297+
dependencies {
298+
implementation enforcedPlatform('io.zonky.test.postgres:embedded-postgres-binaries-bom:11.1.0')
299+
}
300+
301+
3. Or, you can use [Spring's dependency management plugin](https://docs.spring.io/dependency-management-plugin/docs/current-SNAPSHOT/reference/html5/#dependency-management-configuration-bom-import) that provides Maven-like dependency management to Gradle:
302+
303+
plugins {
304+
id "io.spring.dependency-management" version "1.0.6.RELEASE"
305+
}
306+
307+
dependencyManagement {
308+
imports {
309+
mavenBom 'io.zonky.test.postgres:embedded-postgres-binaries-bom:11.1.0'
310+
}
311+
}
312+
313+
</details><br/>
314+
280315
A list of all available versions of postgres binaries is here: https://mvnrepository.com/artifact/io.zonky.test.postgres/embedded-postgres-binaries-bom
281316

282317
Note that the release cycle of the postgres binaries is independent of the release cycle of this library, so you can upgrade to a new version of postgres binaries immediately after it is released.

0 commit comments

Comments
 (0)