0

I have a gradle project with several modules in it. In the main module I have id "io.spring.dependency-management" plugin. In the adapters module I have dependency on the main one implementation project(":main") with runtimeOnly 'io.r2dbc:r2dbc-postgresql in dependency block, which pulls 0.8.12.RELEASE version of the r2dc-postgresql driver.

Now I want to use 0.8.13.RELEASE verision of the driver, so I simply added runtimeOnly 'io.r2dbc:r2dbc-postgresql:0.8.13.RELEASE to the dependency declaration, but now I have two versions of this library in external libraries section (0.8.12.RELEASE and 0.8.13.RELEASE), but ./gradlew adapters:dependencies displays only 0.8.13.RELEASE version.

How to find out where 0.8.12.RELEASE is coming from now and remove it?

I tried

exlude(group = 'io.r2dbc', module =  'r2dbc-postgresql')

but it didn't work

Karim
  • 1
  • it seems when i declare the dependency in the main module, Gradle resolves them properly, only `0.8.13:RELEASE` is shown in external libraries section. But I want to declare it in the `adapters` module anyway... – Karim Nov 07 '22 at 14:48

1 Answers1

0

have you had a look at e.g.: https://docs.gradle.org/current/userguide/resolution_rules.html

or

How to exclude library from all dependencies in Kotlin DSL build.gradle?

or

What does this "all*.exclude" means in Gradle transitive dependency?

Dirk Hoffmann
  • 1,444
  • 17
  • 35
  • yes, I've tried to exclude dependency, but it removes dependency at all, you cannot specify which version you want to remove – Karim Nov 07 '22 at 14:49
  • it seems when i declare the dependency in the main module, Gradle resolves them properly, only `0.8.13:RELEASE` is shown in external libraries section. But I want to declare it in the `adapters` module anyway.. – Karim Nov 07 '22 at 14:49