I am developing a project which should work as an Android sdk, the project includes:
- an app module for demo
- a module called mainSdkModule
- other minor modules that are used in the mainSdkModule (lets say moduleA and moduleB)
the mainSdkModule
imports moduleA
and moduleB
this way:
implementation project(':moduleA')
implementation project(':moduleB')
I am publishing the whole project as an SDK that I want to use in another app project. To test the integration of this SDK I am temporarily publishing it to my local maven folder. What happens is that when I import the sdk into the app project, the build fails with the following error:
Could not find sdk-main-package:moduleA:unspecified.
Required by:
project :mainSdkModule > sdk-main-package:core:1.0.0
I could avoid this error by publishing each module as an indipendent library but I need to keep them internal without exposing them.
Is it normal that the app project asks for a dependency that isn't even supposed to be visible by other projects besides the sdk one?
How can I include moduleA
and moduleB
inside the core and grant access to them for those who import the SDK without exposing these internal modules on maven?