SinTh0r4s / ExampleMod1.7.10

An example mod for Minecraft 1.7.10 with Forge focussed on a stable setup.
MIT License
25 stars 90 forks source link

For some reason this now opens on Java 11 in IntelliJ #41

Open bombcar opened 2 years ago

bombcar commented 2 years ago

I thought the build.gradle was supposed to inform IntelliJ what to use, but it's defaulting to 11 and I can't make it go back.

Command line ./gradew works fine - as do other GTNH mods.

bombcar commented 2 years ago

Found it on this page:

image

weird that we can't hint it ...

SinTh0r4s commented 2 years ago

The isse is, that @TheElan found some elements in ForgeGradle, that cannot use the pipeline from Gradle 6 (Gradle will provide jdk as specified). So we had to roll back to the exception it now throws with java not equals to Java 8.

Gonna bring that feature back as soon as ForgeGradle agrees with it!

TheElan commented 2 years ago

The isse is, that @TheElan found some elements in ForgeGradle, that cannot use the pipeline from Gradle 6 (Gradle will provide jdk as specified). So we had to roll back to the exception it now throws with java not equals to Java 8.

Gonna bring that feature back as soon as ForgeGradle agrees with it!

lines I've removed have nothing to do with java 11, they were just incompatible toolchain feature introduced in 6.2 (iirc). So this should not have anything to do with IDEA. My guess that it might be inferring jvm version from gradle version

I think we can solve it with idea plugin like: https://stackoverflow.com/questions/49679931/how-can-i-use-the-gradle-idea-task-to-set-intellijs-default-settings

However according to the comment:

The only one catch: the plugin does not support the IDEA directory based project configuration layout, only the file based.

But it might've been resolved by now.

TheElan commented 2 years ago

There are also an eclipse version of it: https://docs.gradle.org/6.9.1/userguide/eclipse_plugin.html

and here are official idea plugin docs: https://docs.gradle.org/6.9.1/userguide/idea_plugin.html

bombcar commented 2 years ago

I’ll take a look. It would be nice it we can make it open correctly by default even if we have to modify setupDecomp or add a .idea file