Include dependency dependencies in the project

Hi! Im new with Gradle and I’m trying to include a java project that I will call project “A” that have some dependencies marked as API (Im using the java-library plugin in all projects) thats includes some modules of the project “A” and dependencies downloaded from maven repositories, and I want include it in the project “B”. To do this I’m using the maven publish plugin to publish the project “A” and include as a dependency in the project “B”. The result is that in the project “B” only the project “A” sources are included. But when I see the Gradle window It recognizes the dependencies of the project “A” but doesn’t includes their classpath.

This is the build.gradle of the project “B”:

plugins {

group = "com.github.ynverxe"
version = "1.0-SNAPSHOT"

repositories {
    mavenLocal {
        metadataSources {

dependencies {

Edit: Here are the source code of the project “A”: GitHub - Ynverxe/xenov at dev

A consumer project (B in your case) always have to define the repositories where it can find its dependencies, not only the direct ones, but also the transitive ones.

So you need to add Maven Central and JitPack as repositories to B too to be able to resolve your transitive dependencies of A.

Btw. to just test A from B, you should not use Maven Local as it is broken by design in Maven already.
Instead, you should consider using composite builds, then A is for example automatically rebuilt if necessary when you build B and did make changes in A, and also get A and B sources together in the IDE automatically.