Empty package with custom package register #67
-
Hi there! Thanks for such an awesome tool! Version: 3.1.0 The aim: The config:
Then I have to start the Gradle task like to publish the package: BUT The package is empty. If I remove the package block if will work fine. However, I need to change the package name. How can I do that? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey. You're confusing gradle APIs for creating a new package (register) and modifying an existing package that the plugin autogenerates for your kotlin js targets (named). For your useCase, you have two options. Option 1: Option 2 (recommended): Let me know which option you went with and if you managed to solve your issue. |
Beta Was this translation helpful? Give feedback.
Hey. You're confusing gradle APIs for creating a new package (register) and modifying an existing package that the plugin autogenerates for your kotlin js targets (named). For your useCase, you have two options.
Option 1:
Continue using register api and add all your package files explicitly via files api https://npm-publish.petuska.dev/3.1/user-guide/configuration/package/#files
You can further automate it by adding kotlin js library distribution task as a dependency to package's assemble task so that kotlin stuff is built automatically whenever you try to assemble the package.
Option 2 (recommended):
Use named("your kotlin js rarget name") api and change npm package name via packageName …