https://kotlinlang.org logo
Title
y

Yakeen Sewsanker

07/06/2022, 1:15 AM
Another Kotlin/JS question, regarding how best to orchestrate gradle to build the
productionLibrary
for publishing? I have attempted to do the following:
tasks.getByName("publishJsNpmPublicationToNpmjs") {
            dependsOn(tasks.getByName("jsBrowserProductionLibraryDistribution"))
            doLast {
val jsDir = buildDir.resolve("productionLibrary")
...
}
But
jsBrowserProductionLibraryDistribution
does not create
productionLibrary
. Any clues to what does?
b

Big Chungus

07/06/2022, 1:50 AM
Have you tried #npm-publish? Should "just work" in any kotlin js/mpp project with binaries.library()
P.S. Distribution task just collects the outputs from previous tasks like compileSync, publicPackageJson and processResources
y

Yakeen Sewsanker

07/06/2022, 12:42 PM
I have tried npm-publish and got the following which I couldn't really figure out
b

Big Chungus

07/06/2022, 12:53 PM
Weird... How are you applying kgp?
y

Yakeen Sewsanker

07/18/2022, 7:13 PM
We didn't upgrade the npm-publish to the latest, we just stuck to the version that worked.
👍 1