is there a way to package resources like a json file inside a .kexe or .exe
👀 2
d
Dominaezzz
01/25/2022, 10:11 AM
Yes but it's non trivial.
Dominaezzz
01/25/2022, 10:11 AM
Have a look at immutable byte array.
b
Big Chungus
01/25/2022, 10:15 AM
I'd also be curious to see some examples of it (however rough) as I had attempted this before with little success and in the end had to resort to packaging my resources along the executable and reading them from the fs
b
bod
01/25/2022, 11:17 AM
(last time I tried I employed a dirty trick: I generated a byte array in a Kotlin file in the project - not great obviously)
d
Dominaezzz
01/25/2022, 11:55 AM
That's exactly the way to do it right now. A gradle plugin would be nice.
b
Big Chungus
01/25/2022, 11:56 AM
Ah, i see. So you basically "encode" your assed into the actual
*,kt
source file (i.e. you don't actually embed any resources, because at that point it's just a source file to be compiled)