I followed this article to prepare my project for publication on maven central but I get the error
Cannot add task 'signKotlinMultiplatformPublication' as a task with that name already exists.
when replacing
id("maven-publish")
with
id("convention.publication")
in any of my modules. If I remove
id("maven-publish")
from each module and add it to the root
build.gradle.kts
I can build the project successfully but I don’t think it works neither, I only get the three following tasks. How does one configure gradle to publish a multi-module multi-platform kotlin library?
jean
07/06/2023, 11:40 AM
@Kathrin Petrova maybe you know since you wrote the article?
mavenLocal works?
I would say try running assemble first in case the binaries are not generated 🤔
v
Vampire
07/06/2023, 2:32 PM
If that would solve it, it would be a build bug though. And as only the catch-all tasks are there, but not the ones for the publication/repo combination, it probably wouldn't help either. These shown catch-all tasks just depend on the concrete tasks that are missing.
j
jean
07/09/2023, 6:00 AM
The error was happening due to some code I forgot to remove, everything works fine after removing it 🤦🏻♂️