As far as accessing other files — I used a workaround with
Thread.currentThread().contextClassLoader.getResource("some asset or resource file I know is in src/main/resources")
to get the directory of my JAR, opened that Jar as a
JarFile
and iterated through its
entries()
to open an InputStream to each resource with
Thread.currentThread().contextClassLoader.getResourceAsStream("")
. I copied from the InputStream into a folder that would end up at
~/Applications/my-app.app/Contents/Resources/
and then I just reference that as my new file root from wherever I need to do File I/O throughout the application. Would be nice if we had something on a Gradle level that packaged this for us, hopefully the above feature request leads to that