Package Search
Package Search lets you search, evaluate, and manage dependencies inside the IDE. It is supported for main build tools such as Maven, Gradle, and sbt.
You can use the Dependencies tool window to work with dependencies.
Invoke package search
Depending on a build tool in your project, open the appropriate build script in the editor.
Press Alt+Insert and in the list that opens, select Add dependency.
In the Dependencies tool window, search for the dependency you need, select it the list of search results and click Add.
Work with the Dependencies tool window
The Dependencies tool window provides a list of modules you have as well as a list of all currently installed packages in your project.
Dependencies with a white background are the installed ones. IntelliJ IDEA only shows direct dependencies that you explicitly declared.
The dependencies with a light blue background are your search results.
For each dependency IntelliJ IDEA displays information such as the source code links, activity on StackOverflow, GitHub, and all accessible directly with links from the entry. For more detailed information, see Dependency details pane.
You can use the Dependencies tool window to add, remove, and update packages.
Add a dependency
In the Dependencies tool window, select a module for which you want to add a dependency.
To add a dependency for the whole project, select All Modules.
In the search field, start typing your query.
In the list of search results, locate the package you want to add.
You can select a scope for which you want to add your package. The names of scopes are based on the build tool with which you are working.
The available scopes can be configured in the Package Search settings. The settings also contain scopes you use in your build script file. However, keep in mind that if you specify a non-existing configuration in the settings, it won't be generated in your build script file.
Click Add.
Change a dependency's version
In the Dependencies tool window, locate the dependency for which you want to change the version.
Click the drop-down version selection list and select the needed version.
If you select the Only stable checkbox, IntelliJ IDEA will exclude any dependencies that have no stable versions, and hide them from the list. Otherwise, IntelliJ IDEA displays the latest possible version and you can click Upgrade to change it.
If you select the Kotlin multiplatform option, IntelliJ IDEA will display only the Kotlin multiplatform dependencies.
Remove a dependency
In the Dependencies tool window, select a module from which you want to remove a dependency.
To remove a dependency from the whole project, select All Modules.
Select the dependency you want to remove and in the dependency's details pane, click and select Remove.
IntelliJ IDEA removes the dependency from the selected module.
Copy dependency's coordinates
In the Dependencies tool window, select a package you want to copy.
In the dependency's details pane, right-click the library name and its coordinates and select Copy.
IntelliJ IDEA copies the dependency to a clipboard.
Access the Package Search settings
Press Ctrl+Alt+S to open the IDE settings and select
.From the options on the left, edit the needed build tools section and click OK to save the changes.
Dependency details pane
The dependency details' pane displays the following information about the selected dependency:
Dependency description if it is available
Repository or repositories in which the dependency is available
The authors of the dependency if the names are available
GitHub information if the dependency sources are hosted on GitHub and also Readme
Dependency website and a link to the documentation
List of usages in the current module. This information is available only for the installed dependencies and filtered ones based on the selection in the dependencies list.
Supported Kotlin or Multiplatform platforms if it is a KMP dependency
You can use the icons on the toolbar to hide or restore the details' pane, access the Package Search settings, and manipulate the tool window.