<Docs say> &gt; To avoid duplicate publications of...
# multiplatform
x
Docs say
To avoid duplicate publications of modules that can be built on several platforms (like JVM and JS), configure the publishing tasks for these modules to run conditionally.
What are the repercussions if we don't do this? i.e. running
publishAllPublicationsToMavenRepository
from each build on each target platform?
a
Perhaps, this only applies if you publish on multiple hosts- e.g. Darwin targets on macOs, Windows targets on Windows, and the rest on Linux ? Since recently it's possible to publish everything on macOs. This is what I'm doing without problems.
x
Is it possible to build and publish windows targets on macOS?
I saw my
Task :kstore:windowsTest SKIPPED
on macos 🤔 My current build set up is here
a
I don't support Windows, but there are no any comments about it in the docs (like for Darwin targets) - https://kotlinlang.org/docs/multiplatform-dsl-reference.html#targets I assume it should be possible to compile and publish, but not test.
My approach is to test on different hosts, but publish just on macOS.
x
that is how my current setup is set up - but im not seeing the windows target coming through
it might be some other issue 🤔
a
I'm not sure how your jobs are set up, but you can try running publishToMavenLocal on a macOs host and see if the windows targets are published locally.
x
wait, nvm - i can see the builds now on sonatype, it was just slow
yup, you are correct - i could see them when i do maven publish local
I might as well drop the windows target 😅 there's an issue on okio that makes all my tests fail.
a
It may depend on the use cases of your library. None of my libs support windows and no one ever requested the support.