I added a file to the `jsMain/resources` directory...
# javascript
c
I added a file to the
jsMain/resources
directory of my library module, but it doesn't end up in
build/js/packages
for the final module. Is there anything needed to tell Gradle to put resources from dependencies there?
t
If you run a build, you will find the files in
build\distributions
. We use multiplatform and we ended up copying everything with gradle tasks into our own directory and then create the distribution zip/docker files from there. Check this template project for a working example. It builds a distribution zip and also a docker image. https://github.com/spxbhuhb/zakadabar-application-template/blob/master/buildSrc/src/main/kotlin/zakadabar/gradle/zk-build-tasks.gradle.kts
👍🏾 1
c
If I import the library from another project, will the files will be kept?
t
That is a good question, my guess is yes. But to be honest, I don't know. My resources directory is typically empty for libraries (my CSS is generated from Kotlin code). It might also depend on how you import the project. When it is imported from a repository, I guess the files will be there. You can check the JAR files in the "distributions" directory to see what's in them. These are simple ZIP files, just rename them and have a look inside.