Synchronize IntelliJ and Gradle Projects

Veracode Greenlight

You can synchronize your IntelliJ and Gradle project files to attempt to resolve build errors when using Veracode Greenlight for IntelliJ to scan Gradle projects built outside of IntelliJ.

IntelliJ provides an option for generating module files that it uses to synchronize your IntelliJ and Gradle project files during a build. See the IntelliJ documentation for details about these files.

To synchronize IntelliJ with Gradle:

  1. Locate the Gradle project file build.gradle.
  2. Add apply plugin:"idea" to build.gradle.
  3. In IntelliJ, select File > Settings > Build, Execution, Deployment > Build Tools > Gradle.
  4. Select Generate *.iml files for modules imported from Gradle to generate these files during the next build:
    • {project name}.ipr for project configuration
    • {project name}.iml for module configuration
    • {project name}.iws for workspace configuration
  5. Click OK.