https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

josephivie

02/09/2019, 6:29 PM
That said, it's still better than anything else I know of at its job. I just wish they would have had Kotlin when they started.
a

addamsson

02/09/2019, 6:29 PM
let's move this to a thread
I think this will get much better in time
just think about how messy coroutines were in their first iteration
j

josephivie

02/09/2019, 6:30 PM
Agreed
a

addamsson

02/09/2019, 6:30 PM
(in beta / experimental)
j

josephivie

02/09/2019, 6:31 PM
I know it will be. It's just frustrating to see how short of its potential it is now that we can use Kotlin but most of the APIs are still untyped.
a

addamsson

02/09/2019, 6:31 PM
indeed
I have the same feeling with the
kotlin-multiplatform
plugin
I need to take a look at the recent developments though
I tried to put together a Maven Central build and failed 😄
with the previous iteration
j

josephivie

02/09/2019, 6:32 PM
Agreed. Thankfully, by making a plugin I'm calling
Konvenience
, I got the main part of my file down to this:
Copy code
kotlin {
    all()

    sources {
        main {
            mpp(standardLibrary)
        }
        test {
            mpp(testing)
            mpp(testingAnnotations)
//            mpp(mavenDashPlatform("com.lightningkite", "kommon", "0.0.2"))
        }
        isNonNative.sources {
            isJvm.sources {}
            isJs.sources {}
        }
        isNative.sources {}
    }
}
a

addamsson

02/09/2019, 6:36 PM
what's
Konvenience
?
i'm not familiar with it
i

ian.shaun.thomas

02/09/2019, 6:37 PM
that's the name of the plugin he's making (apparently).
a

addamsson

02/09/2019, 6:37 PM
oh, sorry
I thought you were using an external dependency
i

ian.shaun.thomas

02/09/2019, 6:37 PM
I had to read it twice as well
a

addamsson

02/09/2019, 6:38 PM
I'm a bit preoccupied, my bad 😞
j

josephivie

02/09/2019, 6:44 PM
That's correct. It will be released sometime today unless something goes horribly wrong.
Sorry, I need to communicate more clearly.
a

addamsson

02/09/2019, 6:47 PM
👍
k

kpgalligan

02/09/2019, 8:53 PM
Maven central deployment? There are multiple examples of how this all works together now. Native is more complex because it uses metadata, which means you need to have the right versions of gradle, but it works.
What exactly does Konvenience do? Guess I’ll wait for release and read
j

josephivie

02/10/2019, 12:04 AM
@kpgalligan It's a collection of convenience functions for multiplatform projects. For example, there's a quick way to add information to the POMs of every artifact. There's a
POM.github(url)
which specifies VCS/Issue URL/Website all at once. There's a system for defining target platforms based on what dependencies you have, and specifying dependencies in a format that ensures you catch unsatisfied dependencies earlier. You can also define source sets and the relations between them in a hierarchical manner very quickly. There's a
dokka()
function which invokes dokka on your project and attaches the output to all of the publications.