https://kotlinlang.org logo
c

Chris Zhang

02/13/2019, 7:27 PM
Hi folks, can’t seem to find any documentation on publishing a “common” artifact via the kotlin-multiplatform plugin. Are there any example projects doing so?
s

serebit

02/13/2019, 7:27 PM
It’s called
metadata
. Don’t know why.
Your common source sets produce metadata artifacts, which are functionally identical to common artifacts, just with a different name. Again, no idea why, but it just kinda be like that.
c

Chris Zhang

02/13/2019, 7:31 PM
gotcha, thank you!
k

kpgalligan

02/13/2019, 8:09 PM
Are you looking for example projects publishing libraries?
h

h0tk3y

02/14/2019, 1:14 PM
@serebit FYI the name changed from
common
to
metadata
because we expected the meaning of these artifact to change, too, and this is kind of what's happening. We have plans to update the layout of these artifacts, which will contain the Kotlin metadata for all of the library source sets and some additional data describing the project structure, which should help the consumer side correctly discover the library declarations. I agree that the name change might have led to some unexpected confusion, but I suppose leaving the
*-common
suffix would eventually bring even more perplexity, as the old-style
*-common
artifacts and the new
*-metadata
ones won't be interchangeable really soon (though the tools will still be able to read both, of course). The word metadata is used here as it's what we call the binaries that are produced from common code and contain serialized Kotlin declarations.
c

Chris Zhang

02/14/2019, 4:19 PM
Thanks for that explanation Sergey!
s

serebit

02/14/2019, 4:21 PM
Yep, that makes sense to me, thanks for the explanation!