A MP library will obviously be consumed by multipl...
# multiplatform
a
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
that should work
will need more details of your setup and what “didn’t work” means
a
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
l
Did you configure JS target, I mean
browser
or
nodejs
?
a
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