Inspectopedia 2024.3 Help

Unrecognized dependency notation

Detects incorrect dependency notations.

The following types/formats are supported by Gradle:

  • Instances of Dependency;

  • String or CharSequence values, for example 'org.gradle:gradle-core:1.0';

  • Maps, for example [group: 'org.gradle', name: 'gradle-core', version: '1.0'];

  • FileCollections, for example files('some.jar', 'someOther.jar');

  • Projects, for example project(':some:project:path');

  • ClassPathNotation, for example gradleApi();

  • Lists of dependency notations, for example ['org.gradle:gradle-core:1.0'];

  • (Gradle 7.0+) Version catalog accessors, for example libs.groovy.core.

See Gradle documentation

Example:

dependencies { implementation(1) // reports '1' }

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.

DependencyNotationArgument
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 | Probable bugs

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.3, Qodana for JVM 2024.3,

Can be installed with plugin:

Gradle-Java, 243.23126

Last modified: 03 December 2024