Closed rafaskb closed 9 months ago
Agreed about .ico and .txt, since .ico files are tiny and .txt files are common for data (and licenses, though those should always be present in a readable form). I think .toml, .csv and .tsv would be good too, while we're adding data formats like XML and JSON. I could merge this now and make these changes myself, or you could do it; either way there are certainly formats neither of us has yet thought of that might make sense here.
I'm thinking about this and testing the sizes with different settings... an issue is that this filter applies to everything, even JARs that aren't the current core JAR (I could be wrong on this though). I'm intermittently looking for ways to get just the assets I want to keep with this very limited filter...
Sorry, but I found a better approach! Using code based on Lyze's asset listing task, I now make the nativeCompile task generate a resources-config.json file (in the right place) filled with matches for the file names in assets/
. This was quite hard to get going, but I didn't want to include the apparently-large amount of .properties files present in JARs somewhere. The new Graal config needs to be tested more, but I should be able to close this now (since all of the wanted files should be included, and you can still add more patterns if needed). I think I can release a new Liftoff version once this gets some testing, and it will use Gradle 8.5 (now you can use Java 21!).
This PR adds a few extensions to the list of resources included in Graal native images, namely:
.atlas
files, used by some libraries such as VisUI (default skins are included in the jars).vert
and.frag
, as not all shaders files have theglsl
extension (e.g. gdx-vfx).properties
which is used by I18N bundles, again present in the VisUI library.Just for the sake of it I printed all extensions present inside my game's .jar, and here's the result:
Perhaps
.ico
would be a good addition as well? Maybe.txt
as well?