I'm using the J2V8 library to run some javascript functions in the cordapp, but I'm having troubles to access the js files (or refer to them) during runtime, because when the project is built the js code is copied into the build/resources
folder, not reachable from any running node (as far as I know).
I realized that I need to include the js source code into the corda.jar
files, produced when I run gradle deployNodes
.
I tried to add the following to the build.gradle
file:
jar {
baseName = 'something'
from('src/main/resources/js_library') {
include '*.js'
}
}
but it doesn't solve my problem. Do I need to extend some tasks in the net.corda.plugins
in some way? Or is there a way to access the build/resource
folder once the cordapp is running?