Running IntelliJ Inspections through Gradle / TeamCity

I am trying (unsuccessfully) to run IntelliJ Inspections in a java Gradle project in TeamCity. The documentation is a bit confusing; in particular, it says: "To perform checks for your project, you must have either an IntelliJ IDEA project file (.ipr) or a project directory (.idea) installed in your version control." However, he also claims support for Maven (see this post ) and Gradle projects, which seem incompatible with the requirement to commit IntelliJ project files.

Our team prefers not to write IntelliJ project files, so I'm trying to use the build.gradle file and validation profile. However, even for the simplest Gradle project that I can create, I cannot get IntelliJ inspections to work successfully in TeamCity. Instead, I get this in the log:

[Step 2/2] [6968] WARN -.manage.ContentRootDataService - Unable to import content roots. Reason: target module (ModuleData: module ': d9cc8a1592d04689: unspecified') was not found in ide.

Am I trying to do the impossible?

+5
source share

Source: https://habr.com/ru/post/1236653/


All Articles