IntelliJ IDEA 2021.2 Help

Package Search build system support limitations

Package Search supports many cases in searching and managing dependencies in your project. However, there are some limitations depending on a build tool used in your project.

Gradle

For Gradle only a top level dependencies { } block is supported in the build script. Dependencies set from other places (such as a subprojects block in the root build script) are not supported. Anything not listed in the following table is not supported (but may be in the future).

Use CasesSupport
KotlinGroovy
Full string in dependencies: “io.ktor:ktor-client-cio:1.6.1”
  • read version Supported

  • write version Supported

  • updates in the editor Supported

  • read version Supported

  • write version Supported

  • updates in the editor Supported

Full string with a direct variable: val ver = "1.6.1"

“io.ktor:ktor-client-cio:$ver”

  • read version Supported

  • write version Supported

  • updates in the editor Supported

  • read version Supported

  • write version Supported

  • updates in the editor Supported

Full string with the delegate variable to gradle.properties: “io.ktor:ktor-client-cio:$ver”
  • read version Supported

  • write version Supported

  • updates in the editor Supported

  • read version Supported

  • write version

  • updates in the editor

Ext properties: ext.ver = “1.6.1”

“io.ktor:ktor-client-cio:$ver”

  • read version Supported

  • write version Supported

  • updates in the editor Supported

  • read version Supported

  • write version Supported

  • updates in the editor Supported

Split GAV dependency: implementation group: "io.ktor", name: "ktor-client-apache", version: '1.5.4'
  • read version

  • write version

  • updates in the editor

  • read version Supported

  • write version

  • updates in the editor Supported

Version catalogs (experimental, refer to Gradle documentation.
  • read version

  • write version

  • updates in the editor

  • read version

  • write version

  • updates in the editor

Invoke function for version: implementation("io.ktor:ktor-client-cio:${banana()}")
  • read version

  • write version

  • updates in the editor Supported

  • read version

  • write version

  • updates in the editor

If you encounter any problems with the supported styles, report them to Gradle subsystem.

Maven

All types of dependencies are supported for Maven. All dependencies can be updated if the version is defined using the regular syntax, or it is defined using properties and the ${} syntax. Recursive property declarations (when a property value is defined using another property) are not supported yet.

Use casesSupport
Simple project, the dependency is defined in the file itself:

<dependency> <groupId>...</groupId> <artifactId>...</artifactId> <version>...</version> </dependency>

  • Read Supported

  • Modify Supported

A new dependency is created as simple dependency if this dependency is not declared in the parent <dependencyManagement> section.

Dependency defined in the parent <dependencyManagement> section and is declared in a child section.
  • Read Supported

  • Modify Supported

A new dependency is created as a managed dependency if this dependency declared in the parent <dependencyManagement> section.

Dependency declared in a the parent section as a dependency and inherited in a project.
  • Read Supported

  • Modify Supported

Dependency declared in BOM and imported into a project
  • Read Supported

  • Modify

If you encounter any problems with the supported styles, report them to Maven subsystem.

sbt

Using simple data flow analysis, it is possible to capture some of the common patterns for library. However, dependencies with more complex patterns, for example, generated from functions, are bit supported.

Use CasesSupport
Inline library dependencies: libraryDependencies += “org.scalatest” %% “scalatest” % “3.0.8” % Test
  • update version from the editor Supported

  • capture from the tool window Supported

  • modify from the tool window Supported

Library dependencies are created using val: val scalatest = “org.scalatest” %% “scalatest” % “3.0.8” libraryDependencies += scalatest % Test
  • update version from the editor Supported

  • capture from the tool window Supported

  • modify from the tool window Supported

Sequence of library dependencies: libraryDependencies ++= Seq(scalatest, scalariform)
  • update version from the editor Supported

  • capture from the tool window Supported

  • modify from the tool window Supported

Library dependencies inside top-level subprojects: lazy val common = (project in file("common")) .settings( name := "common", scalaVersion := "3.0.0", libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.9" % Test )
  • update version from the editor Supported

  • capture from the tool window Supported

  • modify from the tool window Supported

Library dependencies inside top-level subprojects that are generated by functions: lazy val common: Project = customNewProject(name=”common”, file(“common”))
  • update version from the editor Supported

  • capture from the tool window

  • modify from the tool window

Library dependencies are generated by functions: libraryDependencies += generateScalaTestDep(version=”3.0.8”)
  • update version from the editor

  • capture from the tool window

  • modify from the tool window

sbt plugins: addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.7.0")
  • update version from the editor

  • capture from the tool window

  • modify from the tool window

If you encounter any problems with the supported styles, report them to Scala plugin.

Repositories

Only a selection of public Maven repositories are included in the Package Search index. You can check the list of indexed repositories at the Package Search website.

The private Maven repositories are not supported. If you use private Maven repositories and need for Package Search to add support for on-premises instances, upvote this issue. Note that comments are not counted as upvotes.

Private proxies of public repositories are not currently supported. If you use proxies and would like to get support in the Package Search plugin, upvote this issue. Note that comments are not counted as upvotes.

Last modified: 31 August 2021