Amper logo

Amper

The project configuration and build tool focused on user experience and IDE support.

Amper Update – February 2024

Read this post in other languages:

Amper is an experimental project configuration tool by JetBrains. With the 0.2.0 release and its accompanying tooling, we have some exciting feature updates and highlights to share.

Amper now supports Gradle version catalogs, completion for adding new dependencies, and more! Read on for more details.

Gradle version catalogs

To make it easier to add Amper to an existing project that uses Gradle version catalogs, Amper can now access dependencies declared in these catalogs, using the $libs.library.name syntax.

The IDE offers completion for libraries declared in a catalog:

You can also navigate from an Amper manifest to referenced catalog entries and find the usages of catalog entries in Amper modules:

Intention actions make it easy to add a new dependency to a catalog, and inspections will warn you if you are using a dependency directly when it’s also available as a catalog entry:

Thanks to the declarative nature of both Amper manifests and the version catalog file, completion and inspections update in real time as you edit the catalog file, without requiring you to re-import the project.

Completion support for dependencies

To make it easier to find dependencies and their versions, you will now get completion for dependencies when editing an Amper manifest, powered by Package Search:

This completion feature is aware of which dependencies block you’re working in, and will only suggest compatible dependencies:

In this example, searching for Coil for all platforms offers only the KMP-ready 3.x releases, while searching for Coil for Android also shows the 2.x releases that are Android-only.

Creating Amper projects in IntelliJ IDEA

Starting from IntelliJ IDEA 2024.1 (currently available in EAP), you can create a new Kotlin project based on Amper when using the New Project wizard:

IDE features

Amper is supported in Fleet, IntelliJ IDEA, and Android Studio. These IDEs offer dedicated tooling for working with Amper module manifests.

You can easily run any Amper application from gutter icons in the manifest file:

On top of regular completion, nested completion of the schema makes it easy to find specific configuration values that you might want to set:

The quick documentation shortcut can help you discover the correct syntax and the available options for various configuration entries:

Get started with Amper

To get started, take a look at the tutorial and the sample projects. You can also check out the KMP template apps with shared UI and native UI.

If you’re using Fleet, the features shown here are available in version 1.30 and later. You can download the latest version using the JetBrains Toolbox App.

To get access to these Amper features in IntelliJ IDEA, use the 2024.1 EAP version or later and make sure you have the latest version of the Amper plugin installed.

Update to the latest version

If you’re already using Amper in a project, update it to the latest version:

plugins {
    id("org.jetbrains.amper.settings.plugin").version("0.2.0")
}

This new version also requires some additional repositories to be added:

pluginManagement {
    repositories {
        …

        // Amper repositories
 
        maven("https://maven.pkg.jetbrains.space/public/p/amper/amper")
        maven("https://www.jetbrains.com/intellij-repository/releases")
        maven("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies")
    }
}

Share your feedback

Amper is still experimental and under active development. While you should not use it in production at this early stage, we encourage you to try Amper and share your thoughts about the tool with us. Your feedback will help shape the future of Amper!

To provide feedback about your experience, join the discussion in the #amper channel on the Kotlinlang Slack, or share your suggestions and ideas in an issue on YouTrack.