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
Run configurations generated by genIntellijRuns build the mod twice before running, which is useless. Right now the generated configurations have this:
As prepareRun[...] builds the mod for running from the IDE, the build task before it is unecessary and should not be generated at all. Right now I have to remove the unnecessary build task from each run configuration manually each time I regenerate the run configurations, which is annoying.
There is one caveat though:
The mod class path (which is specified in an environment variable instead of the JDK class path property) that is configured in a generated run configuration seems to be different depending on this setting:
Found at 'Settings > Build, Execution and Deployment > Build Tools > Gradle', this setting specifies whether the IDE should build with Gradle or with the builtin compiler:
When this setting is set to 'Gradle', the class path in generated run configurations is set to the outputs of the Gradle compiler (somewhere in the build directory).
When this setting is set to 'IntelliJ IDEA', the class path in generated run configurations is set to the outputs of the IntelliJ compiler (somewhere in the out directory).
There can be several solutions now:
The build task is removed from the generated run configurations. In this case, the generated run configurations should always specify the outputs of the Gradle compiler as classpath, since prepareRun[...] always uses the Gradle compiler.
The prepareRun[...] does not compile the mod anymore (does not depend on classes). In this case, run[...] (the Gradle task) should depend on classes so that sources are still compiled before running from Gradle (instead of the run configuration). This is a recommended solution since modders may want to modify what compiler builds the mod (with the setting shown above).
The prepareRun[...] task is removed from the run configurations. In this case, genIntellijRuns should do all preparing configurations such as downloading assets. I discourage this solution though as I don't know what additional configurations prepareRun[...] does that need to be done every time before running.
The text was updated successfully, but these errors were encountered:
FoxSamu
changed the title
Runs generated by genIntellijRuns make the IDE build twice
Runs generated by genIntellijRuns make the IDE build twice
Aug 10, 2020
FoxSamu
changed the title
Runs generated by genIntellijRuns make the IDE build twice
Runs generated by genIntellijRuns make the IDE build twice
Aug 10, 2020
Well that is not the problem... The problem is that the default building process (compileJava, processResources, etc.) runs again after the IDE completes the same building process... As compiling can take a while on big projects it is very annoying to have it compile twice...
Run configurations generated by
![Annotation 2020-08-10 124737](https://user-images.githubusercontent.com/11669132/89775263-bd92f400-db07-11ea-910a-94c218de7f7e.jpg)
genIntellijRuns
build the mod twice before running, which is useless. Right now the generated configurations have this:As
prepareRun[...]
builds the mod for running from the IDE, the build task before it is unecessary and should not be generated at all. Right now I have to remove the unnecessary build task from each run configuration manually each time I regenerate the run configurations, which is annoying.There is one caveat though:
![Annotation 2020-08-10 130117](https://user-images.githubusercontent.com/11669132/89776157-9dfccb00-db09-11ea-8971-50a9ec4028d2.jpg)
The mod class path (which is specified in an environment variable instead of the JDK class path property) that is configured in a generated run configuration seems to be different depending on this setting:
Found at 'Settings > Build, Execution and Deployment > Build Tools > Gradle', this setting specifies whether the IDE should build with Gradle or with the builtin compiler:
build
directory).out
directory).There can be several solutions now:
prepareRun[...]
always uses the Gradle compiler.prepareRun[...]
does not compile the mod anymore (does not depend onclasses
). In this case,run[...]
(the Gradle task) should depend onclasses
so that sources are still compiled before running from Gradle (instead of the run configuration). This is a recommended solution since modders may want to modify what compiler builds the mod (with the setting shown above).prepareRun[...]
task is removed from the run configurations. In this case,genIntellijRuns
should do all preparing configurations such as downloading assets. I discourage this solution though as I don't know what additional configurationsprepareRun[...]
does that need to be done every time before running.The text was updated successfully, but these errors were encountered: