Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application can't use module's module

I have 1 app with 2 module

MyApp -> Framework -> Module

MyApp

implementation project(':Framework')

Framework

 implementation project(':MyModule')

But I can't use MyModule's files in MyApp. IDE show me "cannot access" error where I want to extend the class witch extend a MyModule class. And it not founds the classes from MyModule Anyone have idea about this? What's wrong?

like image 799
vihkat Avatar asked Dec 06 '25 07:12

vihkat


1 Answers

Use api instead of implementation (in the middle module) if you want to provide access to the modules which are using it.

In your case, in the module Framework, use:

api project(':MyModule')
like image 83
Nabin Bhandari Avatar answered Dec 07 '25 21:12

Nabin Bhandari