ankushg
08/21/2019, 3:03 AMlibA was a MPP that depended on stdlib using implementation
- libB was a MPP which depended on libA and stdlib using implementation
- libC was a Kotlin/JS project, depending on libA, libB, and stdlib using compile
I was able to build libC with kotlin-dce-js. I got a version of stdlib that contained the overlap that was used by all three libraries. I could also use runDceKotlinJs.keep to expose specific methods from libA, libB and libC to be called from pure JS.
After bumping to Kotlin 1.3.41 however (still using kotlin2js plugin), when I try to run :libC:runDceKotlinJs, I get error messages complaining that error: duplicate target file will be created for '/opt/projects/my-repo/libA/build/libs/libA-js-0.1.4.jar!lib/kotlin.js' and '/Users/amgupt01/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-js/1.3.41/55b92e441b0ea9cbf079c6452b41687f95571524/kotlin-stdlib-js-1.3.41.jar!kotlin.js'
Any ideas?
EDIT: I've tried using the newer org.jetbrains.kotlin.js plugin, as well as changing `libC`'s dependencies to be implementation instead of compile. Still no luck 😕Big Chungus
08/21/2019, 6:51 AMBig Chungus
08/21/2019, 6:51 AMankushg
08/21/2019, 3:07 PMorg.jetbrains.kotlin.js (and had to rename tasks involving compileKotlin2Js to compileKotlinJs, runDceKotlinJs to runDceKotlin).
When I run :libC:runDceKotlin, I still get the above error though.
Is it because I have things as compile dependencies in libC? Should KotlinJs be able to tell that it's the same version of the same library?Big Chungus
08/21/2019, 3:09 PMankushg
08/21/2019, 3:15 PMimplementation 😕Big Chungus
08/21/2019, 3:16 PMankushg
08/21/2019, 4:13 PM