{"id":25777031,"url":"https://github.com/JetBrains/amper","last_synced_at":"2025-02-27T06:07:06.445Z","repository":{"id":206394165,"uuid":"709379874","full_name":"JetBrains/amper","owner":"JetBrains","description":"Amper - a project configuration and build tool with a focus on the user experience and the IDE support","archived":false,"fork":false,"pushed_at":"2024-12-02T11:41:41.000Z","size":38203,"stargazers_count":1222,"open_issues_count":0,"forks_count":33,"subscribers_count":31,"default_branch":"release/0.5","last_synced_at":"2025-02-19T13:47:08.754Z","etag":null,"topics":["build-tool","compose","fleet","intellij","jetbrains","jvm","kotlin","kotlin-multiplatform"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JetBrains.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-24T15:45:20.000Z","updated_at":"2025-02-19T04:14:44.000Z","dependencies_parsed_at":"2024-04-11T08:26:21.271Z","dependency_job_id":"a00d1095-5dfa-4474-9c3d-56648284021e","html_url":"https://github.com/JetBrains/amper","commit_stats":{"total_commits":1502,"total_committers":24,"mean_commits":"62.583333333333336","dds":0.7922769640479361,"last_synced_commit":"6a2c7f0b86b36c85e9034f3de9bfe416516b323b"},"previous_names":["jetbrains/amper"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Famper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Famper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Famper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Famper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JetBrains","download_url":"https://codeload.github.com/JetBrains/amper/tar.gz/refs/heads/release/0.5","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240987435,"owners_count":19889335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","compose","fleet","intellij","jetbrains","jvm","kotlin","kotlin-multiplatform"],"created_at":"2025-02-27T06:01:34.635Z","updated_at":"2025-02-27T06:07:06.438Z","avatar_url":"https://github.com/JetBrains.png","language":"Kotlin","readme":"[![JetBrains incubator project](https://jb.gg/badges/incubator.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)\n[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Latest release](https://img.shields.io/github/v/tag/JetBrains/amper?color=brightgreen\u0026label=latest%20release)](https://github.com/JetBrains/amper/tags)\n\n# Amper\n\nAmper is a project configuration and build tool. Its goal is to provide a great and smooth user experience and IDE support \nWe believe that this can be achieved by:\n\n- providing a developer- and IDE-friendly declarative configuration DSL - to simplify not only the initial setup but\n  also improve maintainability and let an IDE assist with automatic configuration reliably;\n- bundling a curated set of compatible toolchains and extensions - to support the majority of the scenarios without the need to find compatible plugins;\n- carefully choosing the extensibility points - to keep the overall mental model and UX of the configuration consistent and to avoid unexpected third-party code execution.\n\nIn essence, we aim to achieve a similar well-thought-out and well-tested experience as with [JetBrains IDEs](https://www.jetbrains.com/ides/).\n\nWe’re currently looking at various aspects, including the configuration of projects for building, packaging, publishing,\nand more. At the current stage, however, the focus is primarily on configuring projects for building. While the current\nuse case is Kotlin and Kotlin Multiplatform, Amper also supports Java and Swift (as a requirement for multiplatform).\nHowever, the same approach to configuration could work for other languages and technology stacks in the future.\n\nAmper exists as a standalone build tool as well as a Gradle plugin for existing Gradle-based projects.\nBoth versions offer a unified, easy-to-use, declarative configuration format.\n\nSupported features:\n* Creating and running JVM, Android, iOS, Linux, and macOS applications.\n* Creating Kotlin Multiplatform libraries.\n* Running tests.\n* Mixing Kotlin, Java and Swift code.\n* Code assistance for [module files](docs/Documentation.md#module-file-anatomy) in IntelliJ IDEA and Fleet.\n* [Multi-module](docs/Documentation.md#module-dependencies) projects.\n* Using [Compose Multiplatform](docs/Documentation.md#configuring-compose-multiplatform).\n* Using Compose [multiplatform resources](docs/Documentation.md#using-multiplatform-resources)*.\n* [Gradle interop](docs/Documentation.md#gradle-interop), including combining Amper and Gradle modules in one project*.\n* Integration with [Gradle version catalogs](docs/Documentation.md#dependencyversion-catalogs)*.\n* [Gradle-compatible project layout](docs/Documentation.md#file-layout-with-gradle-interop) for the smooth migration of existing Gradle projects*.\n\n*\\* only in Gradle-based projects*\n\nFuture directions:\n* Support for more Kotlin and Kotlin Multiplatform scenarios and configurations.\n* More [product types](docs/Documentation.md#product-types) and platforms, such as watchOS, Windows, etc.\n* [Platform-specific test types](docs/Documentation.md#special-types-of-tests), including android instrumented tests.\n* [Native dependencies](docs/Documentation.md#native-dependencies) support, such as CocoaPods, Swift Package Manager.\n* [Packaging](docs/Documentation.md#packaging) and [publication](docs/Documentation.md#publishing). \n* [Build variants](docs/Documentation.md#build-variants) support.\n* [Extensibility](docs/Documentation.md#extensibility).\n\nFor a quick start:\n* [Setup](docs/Setup.md) and [usage](docs/Usage.md) instructions\n* [Tutorial](docs/Tutorial.md)  \n* [Documentation](docs/Documentation.md) \n* [Example projects](examples-gradle)\n* Gradle [migration guide](docs/GradleMigration.md)  \n\n## Issues and feedback\n\nAmper uses [YouTrack](https://youtrack.jetbrains.com/issues/AMPER) for issue tracking, [create a new issue](https://youtrack.jetbrains.com/newIssue?project=AMPER) there to report problems or submit ideas.\n\nBefore reporting an issue, please check the [FAQ](docs/FAQ.md).\n\nYou can also join the [Slack channel](https://kotlinlang.slack.com/archives/C062WG3A7T8) for discussions, or share your feedback using the [feedback form](https://surveys.jetbrains.com/s3/Amper-feedback-form).     \n\n## How to Try\nThere are multiple ways to try Amper:\n\n* In the latest [IntelliJ IDEA EAP](https://www.jetbrains.com/idea/nextversion/), for JVM and Android projects ([instructions](docs/Usage.md#using-amper-in-intellij-idea)).\n* In the latest [JetBrains Fleet](https://www.jetbrains.com/fleet/), for the JVM, Android, and Multiplatform projects ([instructions](docs/Usage.md#using-amper-in-fleet)).\n* Using [standalone Amper from the command line](docs/Usage.md#using-the-standalone-amper-version-from-the-command-line).\n* Using [Gradle-Based Amper from the command line](docs/Usage.md#using-the-gradle-based-amper-version-from-the-command-line) to build Gradle-based Amper projects.\n\n## Examples\n\n### Basics\nHere is a very basic JVM \"Hello, World!\" project:\n\n\u003cimg src=\"docs/images/ij-jvm-structure.png\" width=\"50%\" alt=\"\"\u003e\n\n\nThe `main.kt` and `MyTest.kt` files are just regular Kotlin files with nothing special in them. The interesting part is `module.yaml`, which is the Amper module configuration file. For the above project structure, it would simply be: \n\n```yaml\n# Produce a JVM application \nproduct: jvm/app\n```\n\nThat's it. The Kotlin and Java toolchains, test framework, and other necessary functionality are configured and available straight out of the box. You can build it, run it, write and run tests, and more. For more detailed information, check out the [full example](examples-gradle/jvm).\n\n![](docs/images/ij-jvm-result.png)\n\n### Multiplatform\n\nNow, let's look at a Compose Multiplatform project with Android, iOS, and desktop JVM apps, with the following project structure in Fleet:\n\n\u003cimg src=\"docs/images/fleet-kmp-structure.png\" width=\"50%\" alt=\"\"\u003e\n\nNotice how the `src/` folder contains Kotlin and Swift code together. It could, of course, also be Kotlin and Java.\nAnother aspect to highlight is the shared module with the common code in the `src` folder and the platform-specific code folders `src@ios` and `src@android` (learn more about [project layout](docs/Documentation.md#project-layout)).\n\nHere is how `ios-app/module.yaml` file looks:\n```yaml\n# Produce an iOS application\nproduct: ios/app\n\n# Depend on the shared library module: \ndependencies:\n  - ../shared\n\nsettings:\n  # Enable the Compose Multiplatform framework\n  compose: enabled\n```\n\nThis is pretty straightforward: It defines an iOS application with a dependency on a shared module and enables the Compose Multiplatform framework. A more interesting example would be `shared/module.yaml`:\n\n```yaml\n# Produce a shared library for the JVM, Android, and iOS platforms:\nproduct:\n  type: lib\n  platforms: [jvm, android, iosArm64, iosSimulatorArm64, iosX64]\n\n# Shared Compose dependencies:\ndependencies:\n  - $compose.foundation: exported\n  - $compose.material3: exported\n\n# Android-only dependencies  \ndependencies@android:\n  # Android-specific integration with Compose\n  - androidx.activity:activity-compose:1.7.2: exported\n  - androidx.appcompat:appcompat:1.6.1: exported\n\n# iOS-only dependencies with a dependency on a CocoaPod (not yet implemented)\ndependencies@ios:\n  - pod: 'Alamofire'\n    version: '~\u003e 2.0.1'\n\nsettings:\n  # Enable Kotlin serialization\n  kotlin:\n    serialization: json\n  \n  # Enable the Compose Multiplatform framework\n  compose: enabled\n```\n\nA couple of things are worth mentioning. First, note the platform-specific dependencies: sections with the `@\u003cplatform\u003e` qualifier. [The platform qualifier](docs/Documentation.md#platform-qualifier) can be used both in the manifest and also in the file layout. The qualifier organizes the code, dependencies, and settings for a certain platform.\nSecond, the dependencies: section allows not only Kotlin and Maven dependencies, but also [platform-specific package managers](docs/Documentation.md#native-dependencies), such as CocoaPods, Swift Package Manager, and others.\n\n![](docs/images/fleet-kmp-result.png)\n\nNaturally, these examples show only a limited set of Amper features. \nTo get more insight into design and functionality, look at the [documentation](docs/Documentation.md), the [tutorial](docs/Tutorial.md), \nand [example projects](#more-examples).     \n\n### More examples\nCheck our these example projects:\n* JVM \"Hello, World!\" ([standalone](examples-standalone/jvm), [Gradle-based](examples-gradle/jvm))\n* Compose Multiplatform ([standalone](examples-standalone/compose-multiplatform), [Gradle-based](examples-gradle/compose-multiplatform))\n* Compose on iOS ([standalone](examples-standalone/compose-ios), [Gradle-based](examples-gradle/compose-ios)),\n  Android ([standalone](examples-standalone/compose-android), [Gradle-based](examples-gradle/compose-android)),\n  and desktop ([standalone](examples-standalone/compose-desktop), [Gradle-based](examples-gradle/compose-desktop))\n* Kotlin Multiplatform app template with [shared Compose UI](https://github.com/Kotlin/KMP-App-Template/tree/amper) \n  and with [native Android and iOS UI](https://github.com/Kotlin/KMP-App-Template-Native/tree/amper)  \n* Gradle interop in the [Gradle-based Amper](examples-gradle/gradle-interop)\n* And other [standalone](examples-standalone) and [Gradle-based](examples-gradle) examples\n","funding_links":[],"categories":["构建工具"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJetBrains%2Famper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJetBrains%2Famper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJetBrains%2Famper/lists"}