ModContainer#getRootPaths() doesn't seem to include classes build directory
Running FabricLoader.getInstance().getModContainer("modid").get().getRootPaths() on the workspace's mod only returns its resources build folder, not classes.
However, in a workspace with subprojects, the subprojects do get their classes included, but only because Gradle compiles them into a full jar, which Fabric Loader points at. Unlike Gradle though, IntelliJ uses folders for subprojects when running, and, again, only the resources folder gets included.
Have you specifed the classpath groups? Loom has a DSL for this:
loom {
mods {
"modid" {
sourceSet sourceSets.main
}
}
}
Mulit project builds should specify all of the mods here.
I don't think we did. Is there a way to automate this? The project has about as many modules as Fabric API, so I'd prefer to avoid having another list of modules explicitly written out like in settings.gradle.kts
For context, this is the build.gradle.kts: https://github.com/ModificationStation/StationAPI/blob/develop/build.gradle.kts
Realizing now that this is a huge case of an XY problem. Basically, I want to create a utility method which would return a modid based on the caller class. I thought it'd be as easy as iterating through all mods and doing .findPath() on each until the caller's path is found, but apparently not quite.