What is the most adequate way of doing so according to your experience?
My solution (publicly available here: https://gitlab.com/pika-lab/tuprolog/2p-in-kotlin/tree/feature/parser/parser-js) is based on some custom Gradle tasks aimed at copying all .js files next to the ones compiled by kotlin, upon compilation.
What do you think? Is there any better way?
Sadly, rewriting the code in Kotlin is NOT an option: the .js code is indeed generated by ANTLR (i.e. a parser generator)—which does not support Kotlin code generation ATM.