Closed henkelmax closed 8 months ago
Does implementation
not work?
Does
implementation
not work?
No, it complains about all classes from the libraries missing when trying to run the game.
EDIT:
Same for gradle sub projects like shown here
https://github.com/neoforged/MDK/blob/ab3c7e49df21e46f5d316added8e1c5afc334ee0/build.gradle#L100
I only get subprojects to get included on the runtime when doing
tasks.withType(JavaCompile).configureEach {
source(project(':otherproject').sourceSets.main.allSource)
...
This does not seem to work
runs {
client {
modSource project(':otherproject').sourceSets.main
...
implementation
doesn't work because the classes only end up on the classpath, but they actually need to end up on the Minecraft classpath (defined by the legacyClassPath.file
system property) (thanks bootstrap launcher)
Historically this could be done by overwriting the minecraft_classpath
token (which is what minecraftLibrary
did under the hood, which was then used to generate the classpath file.
However, minecraft_classpath
is entirely gone now. Generation of the classpath file is done by UserDevRuntimeDefinition
, which doesn't appear to be accessible from build scripts (and uses a temporary configuration, so definitely isn't suitable here anyway).
This hurts my ability to do stuff too, I'd love to see a fix asap really, as I'm not sure I can properly port - I mean, I'd love for my IDE to be able to test, even though this doesn't affect runtime for me.
This should be addressed by #52.
There does not seem to be an alternative for
minecraftLibrary
in NG7. Is there any way to get libraries working in the development runtime?