Inspectopedia 2026.1 Help

Duplicate dependencies

Detects duplicate dependency declarations in Gradle build scripts.

Offers an intention to navigate to duplicates and a quick-fix to remove exact matches.

Inspection reporting example:

dependencies { implementation("com.google.guava:guava:32.1.2-jre") // will report this line since there is an exact duplicate below implementation("com.google.guava:guava:32.1.2-jre") // will report this line since there is an exact duplicate above api("com.google.guava:guava:32.1.2-jre") // will also report this line since it's available through another configuration }

Remove exact duplicates quick-fix example:

dependencies { implementation("com.google.guava:guava:32.1.2-jre") // will offer a quick fix implementation("com.google.guava:guava:32.1.2-jre") // will offer a quick fix api("com.google.guava:guava:32.1.2-jre") // will not offer a quick fix }
dependencies { implementation("com.google.guava:guava:32.1.2-jre") api("com.google.guava:guava:32.1.2-jre") }

Best practice described here.

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

AvoidDuplicateDependencies
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | Gradle | Best practices

Inspection ID: AvoidDuplicateDependencies

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection AvoidDuplicateDependencies

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Inspection Details

By default bundled with:

IntelliJ IDEA 2026.1, Qodana for JVM 2026.1,

Last modified: 31 March 2026