Thursday, 21 April 2022

Can't find the Transitive Dependency using maven publication

I have checked multiple questions and have checked the answers as well but those are not working for me.

LibraryA -> LibraryB -> App

I want to access the classes of LibraryA from my App and I have added LibraryA in LibraryB and LibraryB is implemented in my App.

api("com.xyz.abc:LibraryA:1.0.0")

I am using the api keyword to add the dependency in LibraryB and both the libraries are published on maven and then I have implemented the LibraryB in my app using implementation keyword and keeping the transitive as true.

implementation("com.xyz.abc:LibraryB:1.0.0"){
    transitive = true
}

After doing all this, when I try to access a class from LibraryA, it gives an error Unresolved Reference. But If I try to do the same thing by adding the LibraryB as a module then all works fine.

Please let me know, what else should I change to make it work for me. Thanks in Advance!!



from Can't find the Transitive Dependency using maven publication

No comments:

Post a Comment