Does anyone have recommendations (pref existing ones) for gradle plugins that turn a directory of files (text files in my case) into a .kt file with string vals holding the contents of the files?
b
Big Chungus
06/23/2021, 7:51 AM
you mean like const val fileName = "file content"?
Big Chungus
06/23/2021, 8:30 AM
That can be achieved with just a few lines of scripting. Consider this script. You can either make it executable (
chmod +x script.kts
) and run it as any other script (the extension can even be removed) like
./script.kts targetDir out.kt
, or alternativelly run it with kotlin compiler directly