Hi, Im trying to publish multiplatform library but...
# multiplatform
g
Hi, Im trying to publish multiplatform library but it fails with
Reason: Task ':mpfilepicker:publishAndroidReleasePublicationToMavenRepository' uses this output of task ':mpfilepicker:signJsPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Any ideas how to fix it?
👍 1
was comparing the build file to examples here https://kotlinlang.org/docs/multiplatform-publish-lib.html#disable-sources-publication but seems like it should work
p
Here to second this problem, started to happen after gradle update to 8.2.1 and kotlin 1.9 If I publish one platform independently works fine but when I do publishAllToMavenCentral fails with that same exception
sad panda 1
c
There’s a YouTrack ticket for this issue. The current fix is ugly, to manually declare
dependsOn
for all the affected tasks (see example from my projects here), but it should at least keep your build from failing
👍 1
g
The issue you linked is marked as third party problem. It mentions ``./gradlew publishToMavenLocal` but this works in my case. Anyways, I decided to write publishing tasks independently, I think it looks simple this way and the workflow succeded 🚀
👍 1
g
Now I have another issue, where Android library is published, but all others are SKIPPED
Copy code
> Task :mpfilepicker:publishAndroidReleasePublicationToMavenRepository
> Task :mpfilepicker:publishJsPublicationToMavenRepository SKIPPED
> Task :mpfilepicker:publishJvmPublicationToMavenRepository SKIPPED
> Task :mpfilepicker:publishKotlinMultiplatformPublicationToMavenRepository SKIPPED
> Task :mpfilepicker:publishMacosX64PublicationToMavenRepository SKIPPED
> Task :mpfilepicker:publishAllPublicationsToMavenRepository
Any ideas how to fix it?