Publish multi module library to maven

Viewed 167

I have a small library that I publish to Gitlab Package Registery using the maven-publish Gradle plugin.

I decided to split it into 2 modules, one named core (published as com.mycompany.core:core) and the other view (published as com.mycompany.core:view). Since the view module rely on the core module, I added implementation project(":core") to its build.gradle

Now if I add my com.mycompany.core:view:1.0 dependency to another project, I get the error

Failed to resolve: Core:core:unspecified

Now if I replace implementation project(":core") by implementation "com.mycompany.core:core:1.0", I can't even build my view module because of course this version of the core module is not yet published.

How can I solve this dependency problem?

EDIT: settings.gradle content

include ':core', ':view'
rootProject.name = "Core"
0 Answers
Related