If I have a multiplatform project, and have multip...
# multiplatform
s
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
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
The way I did this was with attributes on the compilations. I found it more straight forward.
Ahh same link as Russel — Removed
s
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