how do i publish my js to mavenLocal using the new...
# javascript
n
how do i publish my js to mavenLocal using the new plugin and kotlin
1.3.70-eap-42
? i tried to apply https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#publishing-a-multiplatform-library but it seems to not work
d
publishToMavenLocal
gives an error or..?
n
its more like
Copy code
publishing {
    publications.withType<MavenPublication>().apply {
        val js by getting { }
        val metadata by getting { /* Setup the publication for Kotlin metadata */ }
    }
}
this kind of block does not work because it cannot find any publications
d
The publications are supposed to appear (be created) if the
maven-publish
plugin is applied.
n
well it seems not to be ?
this is my current buildscript: https://gist.github.com/NikkyAI/ad5b08d6fdb1940fe6c10f67bc0eaf51 i am trying to see if some builderrors of my program can be fixed by moving this library to kotlin.js and using the better packaging in the eap
d
Ah, I spoke too soon and for some reason assumed you were using the multiplatform plugin. I have no idea why this doesn't work.
n
i could use multiplatform as a shortcut.. but i hoped there would be no need..
it works after a refactor to mpp, so i guess that will have to do for now
👍🏼 1
But publishing with kotlin.js should be looked at! Assuming that was not used too much during dev builds and maybe got forgotten
i
Could you please try to change?
Copy code
`maven-publish` -> id("maven-publish")
UPD: Oh, I see that it is ` not ’
n
funny.. next blocker is gradle crashing on linux ... https://youtrack.jetbrains.com/issue/KT-35968?project=kt the same code that was working fine on windows 10 is now causing stackoverflowerror on gradle sync when depending on this library.. maybe because its on
localMaven()
?