jush
06/09/2021, 6:50 AMjvm
custom compilation.
It's not clear to me how can I add that new custom compilation as dependency in another module.
More details in 🧵shared
module I define the new compilation:
jvm() {
compilations {
val main by getting
val spring by compilations.creating
}
}
then in my other module (called jvmApp
) I don't know how to add the spring
custom compilation as dependency. Currently I have:
dependencies {
implementation(project(":shared"))
}
but that doesn't bring in the spring
one but just the main
onerusshwolf
06/09/2021, 12:40 PMspring
compilation, does that pick it up correctly?
You might instead want to try defining a separate target instead of a separate compilation, and then use attributes to disambiguate them: https://kotlinlang.org/docs/mpp-set-up-targets.html#distinguish-several-targets-for-one-platformjush
06/09/2021, 1:12 PM