Closed ryantheleach closed 3 weeks ago
Discovered: https://github.com/manifold-systems/manifold/tree/master/manifold-deps-parent/manifold-image
I'm not dealing with images, but I think it will still work, image seems overly specifically named.
Edit: spoke too soon. images is very specialized to the point of using IconImages.
the source of Images though, shows a decent example of source generation that would be similar.
Generally, most of the type manifolds behave as you describe. They provide direct, type-safe access to resources. SQL, JSON, XML, etc. The simpler ones are manifold-image and manifold-properties targeting image files (png, jpg, etc.) and properties files. Is there a specific type of resource you are considering?
I just need the input streams of files, rather then specializing them down, in order to feed into other API that takes inputstreams etc. I mainly work with minecraft modding stuff, so in my very specific and niche usecase, I'm loading the assets, adding a namespaced key, and registering them in a registry so they get bundled as DataPacks that get sent to the client after some processing. Sometimes they will be images, sometimes sounds, but everything is being handled by other API's that just need references to the resource files. This is just glue code.
I see. That should be pretty straightforward using manifold-image as a reference. Let me know if you have questions.
Is your feature request related to a problem? Please describe. When loading files from resources, I often run into the issue that files get reorganized, or misspelt, when this happens, it results in a runtime error rather then a compile error.
Describe the solution you'd like I'd like to be able to reference files in resources, very similar to how you can do so on android, in that registry classes are generated with references to all the file names. I figured with Manifold able to generate json, yaml, etc in a similar manner, that it should surely be able to reference files in the resources themselves, but I was unable to find reference to it in the documentation. Additionally, Manifold is well suited having ide plugins to not require a compile reload cycle in order to
turn red code green
which scares off beginners.Describe alternatives you've considered Most alternative gradle plugins seem limited to android, or outdated and no longer hosted (RIP Bintray) it would be nice to have something more general purpose.
This was the option that looked most promising in terms of configuration, but again it was android only: https://github.com/karczews/android-assets-journalist?tab=readme-ov-file#how-to-configure-plugin