Synchronize IntelliJ or Android Studio with Gradle projects
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.
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.
Before you begin:
You meet the Greenlight prerequisites.
To complete this task:
-
Locate the Gradle project file
build.gradle
. -
Add
apply plugin:"idea"
tobuild.gradle
. -
In the IDE, select File > Settings > Build, Execution, Deployment > Build Tools > Gradle.
-
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
-
Click OK.