you would want to compile the library, and add it ...
# getting-started
s
you would want to compile the library, and add it to the project
c
But how to do so using gradle? I'd want to also be able to use the common stuff in the library in the source set for common stuff in my project (commonMain)
s
in your dependencies, instead of
implementation 'maven artifact and version'
, you would use
implementation files('path to jar')
c
By common stuff, I mean not only Kotlin for JVM but also JS and Kotlin/Native, so path to jar won't work 😕
s
it can be whatever library it needs to be
c
Though in multiplatform project, it gives a separate output for each platform. I want to be able to access every common function (e.g. with that expect/actual thing) from the commonMain source set
Also, how does that maven publish thing work — does it “publish” it just locally?
a
if you have the maven-publish plugin, you can run
publishToMavenLocal
and it will “publish” to ~/.m2/repository - other projections can then pick those artifacts up if they have
mavenLocal()
in the
repositories
c
Alright, I'll try to do something like that, thanks
a
you should make sure you set a
group
in the project doing the publishing, to get some reasonable maven coordinates to publish at