IntelliJ Gradle Support: Difference between revisions
Line 16: | Line 16: | ||
{{Internal|Gradle IDEA Plugin|IDEA Plugin}} | {{Internal|Gradle IDEA Plugin|IDEA Plugin}} | ||
=Configuring Gradle Sources= | |||
=<span id='Import_Project'></span>Importing a Project form a Gradle Model= | =<span id='Import_Project'></span>Importing a Project form a Gradle Model= |
Revision as of 01:11, 27 March 2021
External
Internal
Overview
Gradle Home
If asked to specify Gradle home, and get "Gradle location is incorrect", use the "libexec" subdirectory (/usr/local/Cellar/gradle/4.9/libexec).
IDEA Plugin
Configuring Gradle Sources
Importing a Project form a Gradle Model
Use auto-import - If selected, re-import of the project is done automatically every time you make changes to the project.
Group modules. See Grouping Modules.
SNAPSHOT Refresh Problem
There are cases when Gradle pulls the latest version of the SNAPSHOT and caches it in its dependency cache, but IntelliJ IDEA Gradle plugin does not seem to notice it and uses an old version of the snapshot. This is troublesome during debugging, when the source code as displayed by IntelliJ does not match the bytecode being debugged.
Possible solutions for this (have not tested any of them, do that next time when I need it):
1. Refresh Dependencies of the Gradle Module
Gradle tab -> Select the module -> Right click -> Refresh Dependencies
2. Remove the Problem Dependency
Project Tab -> External Libraries -> expand Gradle: library-name -> Select "library root" -> Delete.
Then go to the Gradle tab and refresh dependencies.