KyoriPowered / indra

A set of Gradle plugins to apply common organization build settings.
MIT License
31 stars 6 forks source link

IntelliJ incorrectly sees projects as Java 8 modules #126

Open Camotoy opened 1 year ago

Camotoy commented 1 year ago

As of this commit: https://github.com/GeyserMC/Geyser/commit/a72e49527ddb48885b5bdaf57c766de8070d4c4b, I can verify three different Linux computers read the Geyser project as Java 8. Gradle still correctly compiles to Java 16.

Reproduced on IntelliJ versions 2021/2022/2023.

To reproduce should be as simple as cloning the Geyser repository, finding a record class, and noting how IntelliJ doesn't process the class correctly.

Here's the output of uname -a on my current computer: Linux HOSTNAME 6.2.6-76060206-generic #202303130630~1679424972~22.04~4a8cde1 SMP PREEMPT_DYNAMIC Tue M x86_64 x86_64 x86_64 GNU/Linux And cat /etc/os-release:

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

IntelliJ:

Build #IU-213.5744.223, built on November 27, 2021

Runtime version: 11.0.13+7-b1751.19 amd64
onebeastchris commented 1 year ago

Can reproduce the same issue on Windows 11; also with the Geyser project

zml2008 commented 1 year ago

Sorry for the delay in getting to this! Just on a hunch, can you still reproduce this issue if you change this line to tasks.withType<JavaCompile>().configureEach {?

i have an unfortunate feeling that this has something to do with eager task realization :(

Tim203 commented 1 year ago

That indeed solves the issue! For me at least. But that line isn't even needed because Indra enforces that for us right?