Synchronize IntelliJ or Android Studio with Gradle Projects

Veracode Greenlight

Publication
Veracode Greenlight
Edition date
2022-11-29
Last publication
2022-11-29T16:31:45.191867

You can synchronize IntelliJ or Android Studio with Gradle project files to attempt to resolve build errors when using Veracode Greenlight for IntelliJ to scan Gradle projects built outside the IDE.

Before You Begin

You meet the Greenlight prerequisites.

Overview

IntelliJ and Android Studio provide an option for generating module files that they can use to synchronize the IDE and Gradle project files during a build. See the IntelliJ or Android Studio documentation for details about these files.

Steps

  1. Locate the Gradle project file build.gradle.

  2. Add apply plugin:"idea" to build.gradle.

  3. In the IDE, 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.