how can i depend on the JS or native output of a M...
# multiplatform
j
how can i depend on the JS or native output of a MPP module and embed it as a resource of a plain-'ol java module?
b
In gradle or manually?
j
Gradle
Trying to avoid doing something terrible like hardcoding a path and cross-project dependency on a task
I have a 'js' module where I add the output bundle to a named configuration which I can then depend on from another project: https://github.com/JakeWharton/SdkSearch/blob/master/frontend/chrome-extension/content/build.gradle#L23-L31
b
Not sure about JS. This is a good example for native for how to both depend on and get the output of the link task (nearly always final output unless you do something custom): https://github.com/jetbrains/kotlin/blob/master/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinGradleMobileSharedMultiplatformModuleBuilder.kt#L188
For the embedding part, I'd say just make a Copy task that depends on the link task
j
yeah. hopefully JS follows a similar structure. i'm sure i can discover it based on this. thanks!
b
No prob!