{"id":498162,"date":"2024-08-08T08:20:08","date_gmt":"2024-08-08T07:20:08","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=amper&#038;p=498162"},"modified":"2024-08-30T15:28:35","modified_gmt":"2024-08-30T14:28:35","slug":"amper-update-august-2024","status":"publish","type":"amper","link":"https:\/\/blog.jetbrains.com\/en\/amper\/2024\/08\/amper-update-august-2024","title":{"rendered":"Amper Update August 2024 \u2013 Standalone Projects, Settings Tracing, and More"},"content":{"rendered":"\n<p>The latest release of Amper, <a href=\"https:\/\/github.com\/JetBrains\/amper\/releases\/tag\/v0.4.0\" target=\"_blank\" rel=\"noopener\">version 0.4.0<\/a>, is now available! In this release, we\u2019re introducing a clear definition for the project root and providing a first look at settings tracing in Amper, alongside bug fixes and other improvements.<\/p>\n\n\n\n<p><em>To get support for Amper\u2019s latest features, use <\/em><a href=\"https:\/\/blog.jetbrains.com\/fleet\/2024\/07\/fleet-1-38-is-here-with-support-for-virtual-environments-created-by-anaconda-auto-refresh-for-log-files-improved-proxy-setting-detection-and-much-more\/\" data-type=\"link\" data-id=\"https:\/\/blog.jetbrains.com\/fleet\/2024\/07\/fleet-1-38-is-here-with-support-for-virtual-environments-created-by-anaconda-auto-refresh-for-log-files-improved-proxy-setting-detection-and-much-more\/\"><em>Fleet 1.38<\/em><\/a><em> or <\/em><a href=\"https:\/\/blog.jetbrains.com\/idea\/2024\/08\/intellij-idea-2024-2\/\"><em>IntelliJ IDEA 2024.2<\/em><\/a><em> (or later versions).<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Project file in standalone projects<\/h2>\n\n\n\n<p>Until now, projects using the standalone version of Amper didn\u2019t have a strong definition of what the project contains. In this release, we\u2019re introducing a new project-level configuration file. This clarifies the root and contents of the project, and provides a consistent experience whether you\u2019re working in the IDE or invoking Amper from the command line.<\/p>\n\n\n\n<p><strong>This is a significant design decision, and we\u2019d like to know what you think of it. Please read the details below and <a href=\"#share-your-feedback\" data-type=\"internal\" data-id=\"#share-your-feedback\">share your thoughts<\/a> on this approach for project definitions.<\/strong><\/p>\n\n\n\n<p>Single-module Amper projects can still be defined with just a <code>module.yaml<\/code> file, allowing you to start new projects quickly, with minimal configuration.<\/p>\n\n\n\n<p>Multi-module projects must now contain a <code>project.yaml<\/code> file in their root directory, listing all included modules. This list can contain individual module paths or <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/nio\/file\/FileSystem.html#getPathMatcher-java.lang.String-\" target=\"_blank\" rel=\"noopener\">glob patterns<\/a>, for example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">modules:\n - app\n - util\n - features\/*<\/pre>\n\n\n\n<p>Establishing this project file also lays the groundwork for adding more features and possible improvements in later releases.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<ul>\n<li>This file can serve as a location for project-wide configuration options.<\/li>\n\n\n\n<li>Dependencies and versioning information could be stored in this file (similarly to version catalogs).<\/li>\n\n\n\n<li>Path references could be relative to the project root instead of relative to each configuration file (as it is currently implemented).<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><em>For Gradle-based Amper projects, the <code>settings.gradle.kts<\/code> file continues to serve as the project definition file. However, starting in this version, it must now explicitly list all included Amper modules.<\/em><\/p>\n\n\n\n<p>To learn more about configuring the project root, see the <a href=\"https:\/\/github.com\/JetBrains\/amper\/blob\/HEAD\/docs\/Documentation.md#basics\" target=\"_blank\" rel=\"noopener\">Basics section<\/a> of the documentation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Settings tracing<\/h2>\n\n\n\n<p>As your project grows, it becomes increasingly important to know what\u2019s happening in its build configuration. To help you inspect and understand your build, Amper has facilities for <em>settings tracing <\/em>to keep track of how and where settings values are specified, and when they\u2019re overridden. In this release, we are sharing a first preview of features built on settings tracing, with more to come later.<\/p>\n\n\n\n<p>You can check the tooltip of the settings block (or its nested blocks) to see all effective values and where they\u2019re defined:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/08\/1-settings-tracing-blocks.mp4\"><\/video><\/figure>\n\n\n\n<p>When looking at an individual setting, you can see when it overrides a value that\u2019s already set:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/08\/2-settings-tracing-settings.mp4\"><\/video><\/figure>\n\n\n\n<p>Inspections can warn you if a setting is redundant as it doesn\u2019t actually change a value. This can happen when the same value has already been configured elsewhere or when you\u2019re trying to set a value that\u2019s identical to the default:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/08\/3-settings-tracing-redundant.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Platform-specific configuration<\/h2>\n\n\n\n<p>As Amper is built with <a href=\"https:\/\/www.jetbrains.com\/kotlin-multiplatform\/\" target=\"_blank\" rel=\"noopener\">Kotlin Multiplatform<\/a> in mind, it understands multiplatform projects, and it can tailor your configuration experience to the set of platforms you\u2019re actually using.<\/p>\n\n\n\n<p>With the latest tooling, you will only receive completion for configuration options that are relevant to the set of platforms you\u2019re working with in the given module:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/08\/4-platform-filter.mp4\"><\/video><\/figure>\n\n\n\n<p>You also get a warning if a setting you\u2019ve specified is invalid given your current platform configuration, with a suggestion of which platform you\u2019re missing:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay controls loop muted src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/08\/5-platform-warning.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Update your existing projects<\/h2>\n\n\n\n<p>Starting with this release, Amper builds are shipped in a new repository, which contains both public releases and dev builds. This makes it easier to switch between different versions. If you are using Amper in a Gradle-based project, make sure to update the old repository URL to the new one:<\/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=\"\">\/\/ Remove\nmaven(\"https:\/\/maven.pkg.jetbrains.space\/public\/p\/amper\/amper\")\n\n\/\/ Add\nmaven(\"https:\/\/packages.jetbrains.team\/maven\/p\/amper\/amper\")<\/pre>\n\n\n\n<p>To use the latest version in an existing Gradle-based project, update your plugin version as follows:<\/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.4.0\")\n}<\/pre>\n\n\n\n<p>If you need to update a project using the standalone version of Amper, update your <code>amper<\/code> scripts by following the download instructions on 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<\/a> of the documentation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Try Amper<\/h2>\n\n\n\n<p>To get started with Amper, check out the <a href=\"https:\/\/github.com\/JetBrains\/amper\/tree\/HEAD\/examples-standalone\" target=\"_blank\" rel=\"noopener\">sample projects with standalone Amper<\/a> and the <a href=\"https:\/\/github.com\/JetBrains\/amper\/tree\/HEAD\/examples-gradle\" target=\"_blank\" rel=\"noopener\">samples with Gradle-based projects<\/a>, which have all been updated to the new version. For the full list of changes and bug fixes in Amper 0.4.0, see <a href=\"https:\/\/github.com\/JetBrains\/amper\/releases\/tag\/v0.4.0\" target=\"_blank\" rel=\"noopener\">the release notes<\/a>.<\/p>\n\n\n\n<p>For full support of the latest Amper features, use <a href=\"https:\/\/blog.jetbrains.com\/fleet\/2024\/07\/fleet-1-38-is-here-with-support-for-virtual-environments-created-by-anaconda-auto-refresh-for-log-files-improved-proxy-setting-detection-and-much-more\/\" data-type=\"link\" data-id=\"https:\/\/blog.jetbrains.com\/fleet\/2024\/07\/fleet-1-38-is-here-with-support-for-virtual-environments-created-by-anaconda-auto-refresh-for-log-files-improved-proxy-setting-detection-and-much-more\/\">Fleet 1.38<\/a> or <a href=\"https:\/\/blog.jetbrains.com\/idea\/2024\/08\/intellij-idea-2024-2\/\" data-type=\"link\" data-id=\"https:\/\/blog.jetbrains.com\/idea\/2024\/08\/intellij-idea-2024-2\/\">IntelliJ IDEA 2024.2<\/a> (or later versions).<\/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<h2 class=\"wp-block-heading\">Share your feedback<\/h2>\n\n\n\n<p>Amper is still experimental and under active development. You can provide feedback about your experience by joining the discussion in the <a href=\"https:\/\/slack-chats.kotlinlang.org\/c\/amper\" target=\"_blank\" rel=\"noopener\">Kotlinlang Slack\u2019s #amper channel<\/a> or sharing your suggestions and ideas in a <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/AMPER\" target=\"_blank\" rel=\"noopener\">YouTrack issue<\/a>. Your input and your use cases help shape the future of Amper!<\/p>\n","protected":false},"author":1478,"featured_media":499640,"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\/498162"}],"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=498162"}],"version-history":[{"count":9,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/amper\/498162\/revisions"}],"predecessor-version":[{"id":506661,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/amper\/498162\/revisions\/506661"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/media\/499640"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/media?parent=498162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/categories?post=498162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/tags?post=498162"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/cross-post-tag?post=498162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}