{"id":474463,"date":"2024-05-22T11:40:49","date_gmt":"2024-05-22T10:40:49","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=amper&#038;p=474463"},"modified":"2024-08-30T15:27:08","modified_gmt":"2024-08-30T14:27:08","slug":"amper-update-may-2024","status":"publish","type":"amper","link":"https:\/\/blog.jetbrains.com\/en\/amper\/2024\/05\/amper-update-may-2024","title":{"rendered":"Amper Update May 2024 \u2013 Standalone Build Tool, New IDE Features, and More"},"content":{"rendered":"\n<p>A lot has happened since our last update about <a href=\"https:\/\/github.com\/JetBrains\/amper\" target=\"_blank\" rel=\"noopener\">Amper<\/a>, an experimental build tool by JetBrains. In this post, we\u2019ll look at a brand-new way of using Amper, see how the tooling has improved recently, and learn what\u2019s new in Amper 0.3.0.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Standalone Amper build tool<\/h2>\n\n\n\n<p>We initially built Amper as a Gradle plugin, providing only a configuration layer on top of the existing Gradle build tool. This helped us prototype quickly and focus on validating the Amper user experience. Using Gradle-based Amper also allows incremental adoption within an existing project, as well as adding arbitrary Gradle configuration to your Amper modules.<\/p>\n\n\n\n<p>At the same time, we\u2019ve been experimenting with making Amper a standalone build tool that doesn\u2019t just delegate to an existing system, but handles most build tasks itself. This allows us to have full control over the developer experience, ensure that the entire build configuration is declarative, and provide great tooling integrations for the build tool in the IDE. It also opens up opportunities for performance improvements, such as faster resolution and dependency downloads.<\/p>\n\n\n\n<p><strong>The standalone version of Amper is now available for you to try as a preview<\/strong>, in addition to the Gradle-based version. It currently works with JVM and Android applications, including the use of Compose Multiplatform for these targets. Support for iOS applications is in progress and will be available in later releases.<\/p>\n\n\n\n<p>Amper handles the project import, configures the environment and SDKs used by the project, resolves and downloads dependencies, invokes compilers, and runs applications and tests. It delegates some tasks to external tools in certain scenarios \u2013 for example, the Android Gradle plugin for parts of Android builds, or Xcode build tools for iOS builds.&nbsp;<\/p>\n\n\n\n<p>Projects set up with the standalone version of Amper use the same configuration file format but contain Amper\u2019s own executables (<code>amper<\/code><em> <\/em>and <code>amper.bat<\/code><em>)<\/em>. Check out the <a href=\"https:\/\/github.com\/JetBrains\/amper\/blob\/HEAD\/docs\/Usage.md#using-the-standalone-amper-version-from-the-command-line\" target=\"_blank\" rel=\"noopener\">usage page of the documentation<\/a> to learn more about the available tasks.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2382\" height=\"1364\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/05\/standalone-amper.png\" alt=\"\" class=\"wp-image-474497\"\/><\/figure>\n\n\n\n<p>You can run tasks from the command line or use the tooling offered in Fleet or IntelliJ IDEA:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/05\/standalone-amper-build-run.mp4\"><\/video><\/figure>\n\n\n\n<p>To get started, try some of the <a href=\"https:\/\/github.com\/JetBrains\/amper\/tree\/HEAD\/examples-standalone\" target=\"_blank\" rel=\"noopener\">new sample projects using Amper<\/a> as the build tool. We look forward to hearing your feedback!<\/p>\n\n\n    <div class=\"buttons\">\n        <div class=\"buttons__row\">\n                                                <a href=\"https:\/\/kotlinlang.slack.com\/archives\/C062WG3A7T8\" class=\"btn\" target=\"\" rel=\"noopener\">Discuss in the Slack channel<\/a>\n                                                    <\/div>\n    <\/div>\n\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\">Tooling improvements<\/h2>\n\n\n\n<p>One of the primary goals of Amper is to provide excellent tooling support, which is enabled by using declarative module files, making it possible to reason about the configuration. Below are some of the recent tooling improvements available in <a href=\"https:\/\/blog.jetbrains.com\/en\/fleet\/2024\/05\/fleet-1-35-is-out-introducing-ai-powered-multi-line-code-completion-for-python-and-kotlin-windows-arm-support-wildcards-multiple-ui-improvements\">Fleet 1.35<\/a> and IntelliJ IDEA 2024.2 (<a href=\"https:\/\/www.jetbrains.com\/idea\/nextversion\/\" target=\"_blank\" rel=\"noopener\">currently available as an EAP build<\/a>).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Quick-fixes in Kotlin source code<\/h3>\n\n\n\n<p>Some problems that you encounter while editing your Kotlin sources can be solved by modifying your build configuration, such as by adding compiler flags. As Amper module files are declarative, there is a single straightforward way to make these modifications in them, allowing us to provide reliable quick-fixes in these scenarios.<\/p>\n\n\n\n<p>For example, you can add a module-wide opt-in for an opt-in annotation:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/05\/tooling-add-opt-in.mp4\"><\/video><\/figure>\n\n\n\n<p>Or, if you\u2019re using an older language version in your project, you can update it with a quick-fix when trying to use a new language feature:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/05\/tooling-language-version.mp4\"><\/video><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up projects from scratch<\/h3>\n\n\n\n<p>Amper\u2019s tooling support can help you set up new projects or quickly create new modules in an existing project.<\/p>\n\n\n\n<p>To start a new Amper project from scratch, create an empty module file. There are various templates to choose from, and you can also write your own configuration with completion support:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/05\/setup-1.mp4\"><\/video><\/figure>\n\n\n\n<p>You can then set up the build system using a quick-fix, with a choice of using the standalone version of Amper or the Gradle-based version:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/05\/setup-2.mp4\"><\/video><\/figure>\n\n\n\n<p>To get started, you can also easily create your initial source folders, either empty or containing a basic sample application:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/05\/setup-3.mp4\"><\/video><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Merging configuration blocks<\/h3>\n\n\n\n<p>A frequent use case for editing build configurations is copying code from another file, documentation, or other sources, and pasting it into your existing configuration. To make this easier, we now offer a quick-fix to merge duplicated blocks in your configuration files:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/05\/merge-sections.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Try Amper today<\/h2>\n\n\n\n<p>In addition to the highlights mentioned above, Amper 0.3.0 adds support for the Wasm platform for Kotlin Multiplatform libraries in Gradle-based Amper projects. It also contains several version upgrades, including Kotlin 2.0.0-RC3, Compose Multiplatform 1.6.2, and Android Gradle plugin 8.2.2. For the full list of changes, see <a href=\"https:\/\/github.com\/JetBrains\/amper\/blob\/HEAD\/CHANGELOG.md\" target=\"_blank\" rel=\"noopener\">the changelog<\/a>.<\/p>\n\n\n\n<p>To get started, check out the updated <a href=\"https:\/\/github.com\/JetBrains\/amper\/tree\/HEAD\/examples-gradle\" target=\"_blank\" rel=\"noopener\">samples for Gradle-based projects<\/a>. To use the latest version in an existing project, update your plugin version:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">plugins {\n\u00a0\u00a0\u00a0\u00a0id(\"org.jetbrains.amper.settings.plugin\").version(\"0.3.0\")\n}<\/pre>\n\n\n\n<p>To try the standalone Amper build tool, check out the <a href=\"https:\/\/github.com\/JetBrains\/amper\/tree\/HEAD\/examples-standalone\" target=\"_blank\" rel=\"noopener\">samples in the GitHub repository<\/a>.<\/p>\n\n\n    <div class=\"buttons\">\n        <div class=\"buttons__row\">\n                                                <a href=\"https:\/\/github.com\/JetBrains\/amper\" class=\"btn\" target=\"\" rel=\"noopener\">Try Amper<\/a>\n                                                    <\/div>\n    <\/div>\n\n\n\n\n\n\n\n<p>For the best tooling support, use the latest versions of <a href=\"https:\/\/blog.jetbrains.com\/en\/fleet\/2024\/05\/fleet-1-35-is-out-introducing-ai-powered-multi-line-code-completion-for-python-and-kotlin-windows-arm-support-wildcards-multiple-ui-improvements\">Fleet 1.35<\/a> and IntelliJ IDEA 2024.2 (<a href=\"https:\/\/www.jetbrains.com\/idea\/nextversion\/\" target=\"_blank\" rel=\"noopener\">available as an EAP build<\/a>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Share your feedback<\/h2>\n\n\n\n<p>Amper is still experimental and under active development. Your feedback is vital to us at this stage, and your thoughts and use cases can contribute to our decisions about how to develop Amper.<\/p>\n\n\n\n<p>To provide feedback about your experience, join the discussion in <a href=\"https:\/\/slack-chats.kotlinlang.org\/c\/amper\" target=\"_blank\" rel=\"noopener\">the Kotlinlang Slack\u2019s #amper channel<\/a> or share your suggestions and ideas <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/AMPER\" target=\"_blank\" rel=\"noopener\">in our issue tracker on YouTrack<\/a>.<\/p>\n\n\n\n<p>If you\u2019re attending <a href=\"https:\/\/kotlinconf.com\/2024\/\" target=\"_blank\" rel=\"noopener\">KotlinConf 2024<\/a>, you\u2019ll also find us at the JetBrains booth, where we\u2019ll be happy to chat about Amper in person!<\/p>\n","protected":false},"author":1478,"featured_media":475640,"comment_status":"closed","ping_status":"closed","template":"","categories":[],"tags":[],"cross-post-tag":[6910,6355],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/amper\/474463"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/amper"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/types\/amper"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/users\/1478"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/comments?post=474463"}],"version-history":[{"count":9,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/amper\/474463\/revisions"}],"predecessor-version":[{"id":506659,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/amper\/474463\/revisions\/506659"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/media\/475640"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/media?parent=474463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/categories?post=474463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/tags?post=474463"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/cross-post-tag?post=474463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}