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

spierce7

05/17/2019, 3:39 AM
If I have a multiplatform project, and have multiple jvm variants, and I have a jvm module in the same gradle project, how do I include a specific variant of the multiplatform project as a dependency?
d

Dico

05/17/2019, 5:25 AM
compile(project(":otherproject", "jvmSecondMainApiElements"))
You target a configuration from the other project
Which is an ApiElements configuration
Just print out all configuration names and pick the right one
b

Benjamin Charais

05/17/2019, 4:13 PM
The way I did this was with attributes on the compilations. I found it more straight forward.
Ahh same link as Russel — Removed
s

spierce7

05/18/2019, 5:00 PM
Thanks. I will give that a shot.
So I'm actually getting an error trying to get this to work:
Copy code
Could not find method project() for arguments [:arsel-server, :appengineApiElements] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
So to be clear, I'm trying to import to a specific version of my project into a plain kotlin project