Gradle: API configuration cannot resolve transitive dependencies

40 Views Asked by At

I have a project A, which is dependent on project B,(it is not a sub-project case, the project jar is present in a remote repository) but when I include the project A on project B, as per the api(group:project-a:version), it should show the transitive dependency of project-A on other dependencies, say like spring-web-starter etc. But the dependency tree shows only (group:project-a:version) and also i need to explicitly add all the other dependencies on project B, which are already in project A.

I am using gradle 8.2x and jdk-17

What I am getting

+--- group:project-A:version
+--- org.springframework.boot:spring-boot-starter-web:3.1.1
|    +--- org.springframework.boot:spring-boot-starter:3.1.1
|    |    +--- org.springframework.boot:spring-boot:3.1.1  

What I am expecting

+--- group:project-A:version
|    +--- org.springframework.boot:spring-boot-starter-web:3.1.1
|    |    +--- org.springframework.boot:spring-boot-starter:3.1.1
|    |    |    +--- org.springframework.boot:spring-boot:3.1.1
0

There are 0 best solutions below