I'm working on a presentation around Kotlin Multip...
# multiplatform
j
I'm working on a presentation around Kotlin Multiplatform. I've got a simple KMM app working, but to make the demonstration more compelling as an alternative to our code sharing strategies, I'm also trying to build the common (multiplatform) library with an npm library artifact that I can consume in a NextJS app. However, I've not figured out a way to get the package version to appear in the generated package.json—which makes consuming it as an npm package problematic.
Copy code
Knapsack# cat build/js/package.json
{
  "name": "Knapsack",
  "version": "unspecified",
  "private": true,
  "workspaces": [
    "packages/Knapsack-common",
I've tried to configure it a few different ways, but the current code https://github.com/jzbrooks/Knapsack/blob/1a720273a148cade22d068108528ccbe5906ce2a/common/build.gradle.kts#L13. I searched the issue tracker since but didn't find anything relevant. Does anyone know what I'm missing?
It seems like something might be up with the gradle plugin. I manually deleted the top-level build folder and rebuilt with the following gradle config and it worked.
Copy code
js(IR) {
        version = "0.0.1"
        nodejs()
    }