Anyone interested in showing Timber some MPP love?...
# multiplatform
p
Anyone interested in showing Timber some MPP love? I’ve created a WIP PR to refactor to the new MPP plugin. Still needs a lot of work overall to get it into proper shape. Would be nice to have easy logging with the familiar API on iOS & Android. Comments are welcome… https://github.com/JakeWharton/timber/pull/341
k
Ive done this mostly. Not the mpp part (still platform plugin), but the native changes https://github.com/touchlab/timber/tree/native
See droidcon app for live use https://github.com/touchlab/DroidconKotlin
l
New MPP doesn't allow Android libraries publishing yet (should be fixed in 1.3.20 though)
k
So, just use my version then. Works with android too :)
👍 1
p
nice! still would be great to have a published artifact from the official repo. I believe the work around is to have a separate module for the android artifact.
k
Anything I’ve been publishing that has an Android artifact and isn’t mpp I’ve just left as platform plugin for now. There’s not a lot of value in converting and adding a workaround. Waiting for 1.3.20 seems like less work
What’s the “official repo”? Jecenter or maven central?
I’ve been publishing to a bintray repo due to pace of changes in platform. Assuming that will be much more stable soonish.
p
meant the timber github repo. Seems like Jake wants to make it MPP. There is an issue for it
k
Ah. Ok
p
and a published artifact in the usual places (jcenter, maven central)
k
The other dimension is 4.10 gradle and metadata. Just FYI
And native
a
@kpgalligan do you know how to realease to maven cetnral with the new
kotlin-multiplatform
plugin?
I haven't managed yet
k
I’ll be republishing most of the libraries I’m using in Droidcon over the next few days for 4.10. In advance of Droidcon sf
@addamsson no on maven central. I suspect sqldelight will go there
a
i'm intrigued
k
I hacked JetBrains version of bintray plugin to push to bintray, which could in theory end up in jcenter, but gradle and publishing is not my favorite chore, so I tend to stop at “good enough “
a
yea I use jitpack 😄
k
Anything coming from square and/or jw tends to avoid bintray afaik. I haven’t explored why too much. Kind of waiting for somebody else to figure that out
a
my guess is that it is equally as hard to push to maven central
and when they are equally hard i'd rather use MC instead of bintray
k
Oh, I don’t think they are. Bintray is pretty easy, at least before 4.10, which took a little hacking. I’ll have to figure out how mc works to contribute to square libs, though. Any pr involves my hacks to bintray, which makes a mess. For my repos, though, not a big issue
Apparently I didn’t push changes, but latest goes to bintray with 4.10.2 https://github.com/touchlab/Stately
In car on a phone, so it’ll be a bit before I get to it
a
for MC you need: - signing - javadoc - sources - ossrh user + approved domain
that's pretty much it
and straightforward to set up
k
Yeah, bintray needs a user org and user key, plus creating a project on mc requires some sort of application review. Probably a good thing, but easier to be up and pushing to bintray. Not saying that’s a good thing. Just simpler
I don’t know how that handles the metadata deployment. That definitely needs to work for native publishing
l
Some users of Square libraries use exclusively mavenCentral, so that's partly why they don't use bintray (although bintray mirrors mavenCentral)
k
All for it. Just waiting to see a functional sample :)
l
@kpgalligan Publishing on jcenter from bintray is not hard. You basically click a button, fill a form (ro just leave it empty), then wait for approval notification, and that's it, all the versions will be synced to jcenter
a
can you link to a square library which deploys to maven central and uses the
kotlin-multiplaform
plugin?
i'm not familiar with that lib
l
It's always better to push on jcenter, because you can't remove something from it just like you could on a private bintray repo, so it's more reliable to depend only on jcenter and mavenCentral published artifacts
k
Sort of
I’m not sure they’re ready for mpp publishing (or I didn’t include everything). Wasn’t a huge priority to sort out till after Droidcon
I agree that publishing to a non-changing endpoint is good. However, until recently, all native versions weren’t backward compatible, and gradle metadata also wasn’t (isn’t) backward compatible, so you wind up with a lot of versions, as you need to republish when anything changes. That obviously needs to stabilize as we go forward, but over the last few months, not much was stable
l
@kpgalligan You're just missing the sources. Here's what I use for Android only libraries: https://github.com/LouisCAD/Splitties/blob/master/publish.gradle#L39
k
@louiscad I have sources for js, jvm, and native artifacts. Still got bounced. Hence the “sort it out later” thinking. Didn’t feel like a conversation with bintray support, especially since I’m not a paying customer. The mpp publishes a lot of folders. That includes common folder and metadata folder, which I guess we could try to copy sources into, but you know. Not my highest priority
Today, I mean. Obviously eventually, but was also thinking a re-evaluation on jcenter va mavencentral
j
JCenter are untrustworthy, don't use them. We already have multiplatform publishing set up on SQL Delight for Maven Central. It's not hard.
l
@jw What makes you say they're untrustworthy? I want to know the rationale behind this statement.
k
Exciting instruction video

https://www.youtube.com/watch?v=P_3yo-oU1To&feature=youtu.be

a
@jw how did you do that? Are you using the new
kotlin-multiplatform
plugin? Can you point us to the source?
I just checked, there is no reference to
kotlin-muiltiplatform
, I guess it uses the old multiplatform method
r
They use the
org.jetbrains.kotlin.multiplatform
syntax instead, which I guess is a synonym though I don't really ever see that style outside of Square stuff.
a
oh I see
do you plan to write a guide on how to publish multiplatform projects to maven central?
r
Who are you asking? I don't think anyone has definitive best-practices outside of JetBrains at the moment.
a
I was asking @jw
a
Great thanks for that!!!