Skip to content

Commit 08580a6

Browse files
committed
#31 update readme
1 parent 7528149 commit 08580a6

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
@@ -87,6 +87,41 @@ The default version of the embedded postgres is `PostgreSQL 10.11`, but it can b
8787
</dependencyManagement>
8888
```
8989

90+
<details>
91+
<summary>Using Maven BOMs in Gradle</summary>
92+
93+
In Gradle, there are several ways how to import a Maven BOM.
94+
95+
1. You can define a resolution strategy to check and change the version of transitive dependencies manually:
96+
97+
configurations.all {
98+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
99+
if (details.requested.group == 'io.zonky.test.postgres') {
100+
details.useVersion '11.6.0'
101+
}
102+
}
103+
}
104+
105+
2. If you use Gradle 5+, [Maven BOMs are supported out of the box](https://docs.gradle.org/5.0/userguide/managing_transitive_dependencies.html#sec:bom_import), so you can import the bom:
106+
107+
dependencies {
108+
implementation enforcedPlatform('io.zonky.test.postgres:embedded-postgres-binaries-bom:11.6.0')
109+
}
110+
111+
3. Or, you can use [Spring's dependency management plugin](https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/#dependency-management-configuration-bom-import) that provides Maven-like dependency management to Gradle:
112+
113+
plugins {
114+
id "io.spring.dependency-management" version "1.0.6.RELEASE"
115+
}
116+
117+
dependencyManagement {
118+
imports {
119+
mavenBom 'io.zonky.test.postgres:embedded-postgres-binaries-bom:11.6.0'
120+
}
121+
}
122+
123+
</details><br/>
124+
90125
A list of all available versions of postgres binaries is here: https://mvnrepository.com/artifact/io.zonky.test.postgres/embedded-postgres-binaries-bom
91126

92127
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)