I have project structure with 3 modules: :library
, :shared
and :internal
.
Dependencies between them are following:
:library
--depends on--> :internal
via implementation
:library
--depends on--> :shared
via api
:internal
--depends on--> :shared
via implementation
So, :library
uses :internal
, without exposing it and :shared
exposing it.
Additionally, :internal
uses :shared
as well.
Question: How do I publish :library
module, using maven-publish
Gradle plugin and include other modules sources?
Currently, my publishing looks like this (build.gradle.kts of :library
):
publishing {
publications {
register<MavenPublication>("release") {
groupId = Project.GROUP_ID
artifactId = Project.ARTIFACT_ID
version = Project.VERSION
from(components["release"])
}
}
}
But after publishing (I use JitPack) and adding it as dependency in build.gradle file of another project, I get following errors, trying to build it:
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find [:shared module].
Required by:
project :app > [`:library` module]
How do I provide my dependency modules to published one?