Thread
#multiplatform
    a

    Andrew

    2 years ago
    A MP library will obviously be consumed by multiple targets, but to start I'm not even sure how to do it for the first at the moment. I'd like my Android studio library to use this shared code but no idea what the workflow looks like. For example 1) Make a code change in shared library 2) ??? 3) Run android app with that code change. Currently I have a shared JVM gradle library I reference with a relative path in my settings.gradle so android studio sees that as a 2nd module and my code changes work seamlessly. Attempting the same with an MP project didn't work.
    e

    edenman

    2 years ago
    that should work
    will need more details of your setup and what “didn’t work” means
    a

    Andrew

    2 years ago
    I might have a better starting point now. I think one issue is creating a project vs a module which not primarily doing java development for my career confuses me. Creating a project and trying to reference in Android studio did not work as intended but a tutorial jetbrains has used a module instead so I will try that next.
    Okay I got it mostly working now the way I need it to. One small problem, it doesn't seem to like the javascript target which is what I actually need instead of native for now. Getting this error unless I comment out the js {} block. Could not create an instance of type org.jetbrains.kotlin.gradle.targets.js.subtargets.KotlinBrowserJs
    Liliia

    Liliia

    2 years ago
    Did you configure JS target, I mean
    browser
    or
    nodejs
    ?
    a

    Andrew

    2 years ago
    both were enabled, didn't try individually excluding 1 or the other
    A workable solution I found was to conditionally exclude those if "android" was a project property