p

    patjackson52

    3 years ago
    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
    kpgalligan

    kpgalligan

    3 years ago
    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
    louiscad

    louiscad

    3 years ago
    New MPP doesn't allow Android libraries publishing yet (should be fixed in 1.3.20 though)
    kpgalligan

    kpgalligan

    3 years ago
    So, just use my version then. Works with android too 😃
    p

    patjackson52

    3 years ago
    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.
    kpgalligan

    kpgalligan

    3 years ago
    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

    patjackson52

    3 years ago
    meant the timber github repo. Seems like Jake wants to make it MPP. There is an issue for it
    kpgalligan

    kpgalligan

    3 years ago
    Ah. Ok
    p

    patjackson52

    3 years ago
    and a published artifact in the usual places (jcenter, maven central)
    kpgalligan

    kpgalligan

    3 years ago
    The other dimension is 4.10 gradle and metadata. Just FYI
    And native
    a

    addamsson

    3 years ago
    @kpgalligan do you know how to realease to maven cetnral with the new
    kotlin-multiplatform
    plugin?
    I haven't managed yet
    kpgalligan

    kpgalligan

    3 years ago
    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

    addamsson

    3 years ago
    i'm intrigued
    kpgalligan

    kpgalligan

    3 years ago
    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

    addamsson

    3 years ago
    yea I use jitpack 😄
    kpgalligan

    kpgalligan

    3 years ago
    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

    addamsson

    3 years ago
    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
    kpgalligan

    kpgalligan

    3 years ago
    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

    addamsson

    3 years ago
    for MC you need:- signing - javadoc - sources - ossrh user + approved domain
    that's pretty much it
    and straightforward to set up
    kpgalligan

    kpgalligan

    3 years ago
    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
    louiscad

    louiscad

    3 years ago
    Some users of Square libraries use exclusively mavenCentral, so that's partly why they don't use bintray (although bintray mirrors mavenCentral)
    kpgalligan

    kpgalligan

    3 years ago
    All for it. Just waiting to see a functional sample 😃
    louiscad

    louiscad

    3 years ago
    @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

    addamsson

    3 years ago
    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
    louiscad

    louiscad

    3 years ago
    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
    kpgalligan

    kpgalligan

    3 years ago
    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
    louiscad

    louiscad

    3 years ago
    @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
    kpgalligan

    kpgalligan

    3 years ago
    @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

    jw

    3 years ago
    JCenter are untrustworthy, don't use them. We already have multiplatform publishing set up on SQL Delight for Maven Central. It's not hard.
    louiscad

    louiscad

    3 years ago
    @jw What makes you say they're untrustworthy? I want to know the rationale behind this statement.
    kpgalligan

    kpgalligan

    3 years ago
    Exciting instruction video

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

    a

    addamsson

    3 years ago
    @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
    russhwolf

    russhwolf

    3 years ago
    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

    addamsson

    3 years ago
    oh I see
    do you plan to write a guide on how to publish multiplatform projects to maven central?
    russhwolf

    russhwolf

    3 years ago
    Who are you asking? I don't think anyone has definitive best-practices outside of JetBrains at the moment.
    a

    addamsson

    3 years ago
    I was asking @jw
    a

    addamsson

    3 years ago
    Great thanks for that!!!