[Suggestion] Way to declare injected interfaces elsewhere
See original GitHub issueOne of my projects has around 300 lines worth of injected interfaces. This makes the fmj very messy and 7x longer than it needs to be. On top of this, since $
is used for inner classes AND to mark something as a placeholder for gradle, we need this in our processResources
:
for (int i = 0; i < 6000; i++) {
String name = "class_$i"
properties.put(name, name)
}
properties.put("DeserializerAccessor", "DeserializerAccessor")
properties.put("MixAccessor", "MixAccessor")
properties.put("AnimatedTextureAccessor", "AnimatedTextureAccessor")
properties.put("BuilderAccessor", "BuilderAccessor")
properties.put("EntryAccessor", "EntryAccessor")
I’ve tried storing them elsewhere and copying them over with gradle property expansion in processResources
, but that doesn’t work since loom directly reads the file. I tried messing around with adding a source set for it to look at, but got nowhere. Specifying injected interfaces elsewhere would solve this.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Dependency injection guidelines - .NET | Microsoft Learn
Learn various dependency injection guidelines and best practices for .NET application development.
Read more >ASP.NET Core Dependency Injection - Registering Multiple ...
There are two methods on the interface. The first is called CanEnrich and this will take the message object and determine if this...
Read more >IoC and binding to interfaces - Stack Overflow
I'm taking a hearty recommendation to use Ninject. Cool. But as I sit down to create my first class that will rely on...
Read more >To Inject Or Not To Inject - Simple Thread
I was speaking with Phil Haack this week at MIX 09 and we were discussing his choice to drop Dependency Injection from his...
Read more >NET Core Dependency Injection - Seeing Sharply
If you already know what DI is, and how to use interfaces to mock your classes and test them, etc. then you can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not a solution for the long files, but you can rewrite
$
as\u0024
in JSON files to preventprocessResources
from trying to expand it.Oh my bad, I read the code snippet totally wrong 😄