Hi, Where in your opinion is the best place to pu...
# announcements
g
Hi, Where in your opinion is the best place to publish an
open source kotlin mpp library
?
maven central
,
bintray
,
jcenter
, other?
a
I like Bintray. Easy to get started, easy to publish.
l
jcenter is a superset of mavenCentral, so publishing there will have it on jcenter as well. bintray and jcenter are both offered by Jfrog, and you actually need bintray to publish (or "sync") with jcenter.
I personally use bintray synced with jcenter as well, beause it's quite simple and reliable enough.
g
Interesting, thanks for the suggestions. So I think I’ll try to start from bintray then 🙂
👍 1
m
I use bintray, link it with jcenter and also sync it with maven central (a bintray feature)
v
were you able to upload, your jar files, etc, into bintray?, Im having problem where on my pom is only file uploaded to bintray.
m
Yes. It’s annoying to set up though. I’ve put the logic in an internal Gradle plugin that all my libraries use: https://github.com/fluidsonic/fluid-gradle/blob/69bd89106f5a21c495fa1c8e2f607e72a19084a4/sources/LibraryVariantConfiguration.kt#L289
g
The problem that I’m having now is the library is being consumed locally but not from bintray. It looks like is is not including the
.module
files there and because of that the multiplatform library cannot be resolved. Have you already faced this issue? Does someone know how to solve?
l
@GarouDan Are you using Gradle 6+ in both the published library and the project using it?
g
@louiscad, yes, and I can confirm that from bintray it doesn’t work, but using my maven local repository works. Actually in bintray a lot of files are missing there, but specially is missing the .module one and I’ve seen that inside of it we some kind of routes to the different targets.
I think, if it is possible, I need to configure the configure<BintrayExtension> block in a way that it will send everything to there.
I think I’ve found an workaround. If you call the mpp library from mavenLocal we can use something like:
Copy code
implementation("com.company:library:1.0.0")
but, at lest for me, when publishing to bintray using bintrayUpload, I was able to consume only with:
Copy code
implementation("com.company:library-jvm:1.0.0")
. I tried manually zip and unpack everything that I had locally to there but even in this way, from my tests, only the
-jvm
verison worked. Don’t know why locally this can be automatically resolve and from there not. If you have any clue, please kindly let me know
l
As seen here, you need to use
maven-publish
in place of the bintray plugin: https://kotlinlang.slack.com/archives/C3PQML5NU/p1592377943043700?thread_ts=1592312199.024500&amp;cid=C3PQML5NU
g
As you said, using the maven publish plugin and enabling the metadata preview (just for precaution), I’m being able now to consume the libraries from bintray without specifying the sufix. Thanks for the tip 😃