gradle-baseline
gradle-baseline copied to clipboard
Recommend `open *.ipr` after generating Intellij IDEA projects
There are various different ways of importing java projects into intellij, but the only reliable one to get immutables generation working is to use open *.ipr
Important note: it's not whether open *.ipr
or the File > Open menu item from within IntelliJ that causes the Immutables generation issues, but instead what response was given to the "Import Unlinked Gradle Project?" popup in IntelliJ (coming from the IntelliJ Gradle plugin) right after opening the project.
If "Do Not Import" is chosen, the org.inferred.processors Gradle plugin seems to do what it's supposed to and generated .java files get placed in $module_root/generated_src
directories. If "Import" is chosen, everything goes weird - the generated .java files are placed in $module_root/build/classes/java/my/package/path
, and they're not put on the classpath in IntelliJ so you won't be able to import them.
There should be a large warning that the Gradle Intellij plugin shouldn't be used, and a user with it installed should choose "Do Not Import". Otherwise, debugging why the generated files are being placed in build/classes/java
instead of generated_src
is very non-obvious and time-consuming.
This issue has been automatically marked as stale because it has not been touched in the last 60 days. Please comment if you'd like to keep it open, otherwise it'll be closed in 7 days time.
Just FYI - this behaves weirdly with latest EAP releases (2018.3), opens 2 windows where none of them have all the function bars
This issue has been automatically marked as stale because it has not been touched in the last 60 days. Please comment if you'd like to keep it open, otherwise it'll be closed in 7 days time.
This issue has been automatically marked as stale because it has not been touched in the last 60 days. Please comment if you'd like to keep it open, otherwise it'll be closed in 7 days time.
Closing, ipr is deprecated