You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When getRunWithIdea is enabled in the IDEA run configuration, NG will specify that classes should be loaded from IntelliJ's output directory instead of Gradle's. However, the way classes within that directory are found doesn't appear to be correct when working with a multi-module setup:
If using a global output directory rather than a per-module one (this happens when working with Loom, as they set idea.module.inheritOutputDirs = true), then classes are put in $outDir/production/$moduleName rather than $outDir/production.
If not using a global output directory, then the output directory is only correct for the root module, and not any child modules.
Thinking about this more generally, I'm not entirely sure that configuring the output directory (or getRunWithIdea via Gralde) is the correct thing to do. Both those properties are workspace/user specific, and (as far as I know) cannot be controlled by Gradle.
I wonder if a better option would be to read IDEA's config directly - this is what Loom does, and it works pretty reliably.
I'm happy to take a look at a PR for this if that sounds reasonable?
The text was updated successfully, but these errors were encountered:
NeoGradle/common/src/main/java/net/neoforged/gradle/common/util/run/RunsUtil.java
Lines 92 to 96 in 96d3cf8
When
getRunWithIdea
is enabled in the IDEA run configuration, NG will specify that classes should be loaded from IntelliJ's output directory instead of Gradle's. However, the way classes within that directory are found doesn't appear to be correct when working with a multi-module setup:idea.module.inheritOutputDirs = true
), then classes are put in$outDir/production/$moduleName
rather than$outDir/production
.Thinking about this more generally, I'm not entirely sure that configuring the output directory (or
getRunWithIdea
via Gralde) is the correct thing to do. Both those properties are workspace/user specific, and (as far as I know) cannot be controlled by Gradle.I wonder if a better option would be to read IDEA's config directly - this is what Loom does, and it works pretty reliably.
I'm happy to take a look at a PR for this if that sounds reasonable?
The text was updated successfully, but these errors were encountered: