Include extra files in jar
I read from xml and gram files in my Java node
URL url = MyClass.class.getResource("config.xml");
configurationManager = new ConfigurationManager(url);
However, this xml file is not included in the jar file created by the gradle. That's why my app will keep returning NullPointerException.
I tried adding files as dependency to build.gradle file, without succes
runtime fileTree(dir: 'src/path/to/my/class', include: ['.gram']) runtime fileTree(dir: 'src/path/to/my/class', include: ['.xml'])
I read at SO , that i should add from "rule" to the jar task, but I can't find it.
So, how can I add files to the jar?