{"id":13407066,"url":"https://github.com/realm/realm-kotlin","last_synced_at":"2025-05-15T11:09:00.822Z","repository":{"id":37397564,"uuid":"235075339","full_name":"realm/realm-kotlin","owner":"realm","description":"Kotlin Multiplatform and Android SDK for the Realm Mobile Database: Build Better Apps Faster.","archived":false,"fork":false,"pushed_at":"2025-01-20T20:27:06.000Z","size":14646,"stargazers_count":1024,"open_issues_count":255,"forks_count":68,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-04-12T03:45:23.764Z","etag":null,"topics":["android","android-library","database","kotlin","kotlin-multiplatform","kotlin-multiplatform-library","kotlin-multiplatform-mobile","kotlin-native","nosql-database","realtime-database"],"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/realm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2020-01-20T10:27:03.000Z","updated_at":"2025-04-11T00:17:44.000Z","dependencies_parsed_at":"2023-12-21T15:29:03.601Z","dependency_job_id":"b3de0bab-678b-4a84-93c0-325f4ee7bb62","html_url":"https://github.com/realm/realm-kotlin","commit_stats":null,"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realm%2Frealm-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realm%2Frealm-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realm%2Frealm-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realm%2Frealm-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realm","download_url":"https://codeload.github.com/realm/realm-kotlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328386,"owners_count":22052632,"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":["android","android-library","database","kotlin","kotlin-multiplatform","kotlin-multiplatform-library","kotlin-multiplatform-mobile","kotlin-native","nosql-database","realtime-database"],"created_at":"2024-07-30T20:00:19.008Z","updated_at":"2025-05-15T11:09:00.805Z","avatar_url":"https://github.com/realm.png","language":"Kotlin","funding_links":[],"categories":["Libraries","\u003ca name=\"java\"\u003e Java/Kotlin","Kotlin","Database"],"sub_categories":["Storage","📦 Storage","\u003ca name=\"swift-tools\"\u003e\u003c/a\u003eSwift Tools","NoSQL"],"readme":"\u003e [!WARNING]\n\u003e We announced the deprecation of Atlas Device Sync + Realm SDKs in September 2024. For more information please see:\n\u003e - [SDK Deprecation](https://www.mongodb.com/docs/atlas/device-sdks/deprecation/)\n\u003e - [Device Sync Deprecation](https://www.mongodb.com/docs/atlas/app-services/sync/device-sync-deprecation/)\n\u003e\n\u003e For a version of Realm Kotlin without sync features, install version `3.0.0+` or see the `community` git branch.\n\n\n\u003cpicture\u003e\n    \u003csource srcset=\"./images/logo-dark.svg\" media=\"(prefers-color-scheme: dark)\" alt=\"realm by MongoDB\"\u003e\n    \u003cimg src=\"./images/logo.svg\" alt=\"realm by MongoDB\"\u003e\n\u003c/picture\u003e\n\n[![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/io/realm/kotlin/io.realm.kotlin.gradle.plugin/maven-metadata.xml.svg?colorB=ff6b00\u0026label=Gradle%20Plugin%20Portal\u0026versionPrefix=2)](https://plugins.gradle.org/plugin/io.realm.kotlin)\n[![Maven Central](https://img.shields.io/maven-central/v/io.realm.kotlin/gradle-plugin/2.3.0?colorB=4dc427\u0026label=Maven%20Central)](https://search.maven.org/artifact/io.realm.kotlin/gradle-plugin)\n[![Kotlin](https://img.shields.io/badge/kotlin-2.0.20-blue.svg?logo=kotlin)](http://kotlinlang.org)\n[![License](https://img.shields.io/badge/License-Apache-blue.svg)](https://github.com/realm/realm-kotlin/blob/master/LICENSE)\n\n\nRealm is a mobile database that runs directly inside phones, tablets or wearables. \n\nThis repository holds the source code for the Kotlin SDK for Realm, which runs on Kotlin Multiplatform and Android.\n\n## Why Use Realm\n\n* **Intuitive to Developers:** Realm’s object-oriented data model is simple to learn, doesn’t need an ORM, and lets you write less code.\n* **Built for Mobile:** Realm is fully-featured, lightweight, and efficiently uses memory, disk space, and battery life.\n* **Designed for Offline Use:** Realm’s local database persists data on-disk, so apps work as well offline as they do online.\n* **[Atlas Device Sync](https://www.mongodb.com/docs/atlas/app-services/sync/)**: Makes it simple to keep data in sync across users, devices, and your backend in real-time. Get started for free with [a template application](https://github.com/mongodb/template-app-kotlin-todo) and [create the cloud backend](http://mongodb.com/realm/register?utm_medium=github_atlas_CTA\u0026utm_source=realm_kotlin_github).\n\n# General Availability \n\nThe Realm Kotlin SDK is GA.\n\nDocumentation can be found [here](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/).\n\nSample projects can be found [here](https://github.com/realm/realm-kotlin-samples).\n\nIf you are upgrading from a previous beta release of Realm Kotlin, please see the [CHANGELOG](CHANGELOG.md) for the full list of changes.\n\nIf you are migrating from [Realm Java](https://github.com/realm/realm-java), please see the [Migration Guide](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/migrate-from-java-sdk-to-kotlin-sdk/).\n\n\n# Usage\n\n## Installation\n\nInstallation differs slightly depending on the type of project and whether or not you are using Device Sync. See the details in the documentation:\n\n* [Android](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/install/#std-label-kotlin-install-android)\n* [Kotlin Multiplatform](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/install/#std-label-kotlin-install-kotlin-multiplatform)\n\nAlso pay attention to restrictions on which versions of Kotlin and other dependencies that are supported. You can read \nmore in the [version compatibility matrix](#version-compatibility-matrix).\n\n## Define model\n\nStart writing your database logic by first defining your model.\n\n```Kotlin\nclass Person : RealmObject {\n    var name: String = \"Foo\"\n    var dog: Dog? = null\n}\n\nclass Dog : RealmObject {\n    var name: String = \"\"\n    var age: Int = 0\n}\n```\n\n## Open Database\n\nDefine a _RealmConfiguration_ with the database schema, then open the Realm using it.\n\n```Kotlin\n// use the RealmConfiguration.Builder() for more options\nval configuration = RealmConfiguration.create(schema = setOf(Person::class, Dog::class)) \nval realm = Realm.open(configuration)\n```\n\n## Write\n\nPersist some data by instantiating the model object and copying it into the open Realm instance.\n\n```Kotlin\n// plain old kotlin object\nval person = Person().apply {\n    name = \"Carlo\"\n    dog = Dog().apply { name = \"Fido\"; age = 16 }\n}\n\n// Persist it in a transaction\nrealm.writeBlocking { // this : MutableRealm\n    val managedPerson = copyToRealm(person)\n}\n\n// Asynchronous updates with Kotlin coroutines\nCoroutineScope(context).async {\n    realm.write { // this : MutableRealm\n        val managedPerson = copyToRealm(person)\n    }\n}\n```\n\n## Query\n\nThe query language supported by Realm is inspired by Apple’s [NSPredicate](https://developer.apple.com/documentation/foundation/nspredicate), see more examples [here](https://www.mongodb.com/docs/atlas/device-sdks/realm-query-language/)\n\n```Kotlin\n// All persons\nimport io.realm.kotlin.ext.query\n\nval all = realm.query\u003cPerson\u003e().find()\n\n// Persons named 'Carlo'\nval personsByNameQuery: RealmQuery\u003cPerson\u003e = realm.query\u003cPerson\u003e(\"name = $0\", \"Carlo\")\nval filteredByName: RealmResults\u003cPerson\u003e = personsByNameQuery.find()\n\n// Person having a dog aged more than 7 with a name starting with 'Fi'\nval filteredByDog = realm.query\u003cPerson\u003e(\"dog.age \u003e $0 AND dog.name BEGINSWITH $1\", 7, \"Fi\").find()\n\n// Observing changes with Coroutine Flows\nCoroutineScope(context).async {\n    personsByNameQuery.asFlow().collect { result: ResultsChange\u003cPerson\u003e -\u003e\n        println(\"Realm updated: Number of persons is ${result.list.size}\")\n    }\n}\n```\n\n## Update\n\n```Kotlin\n// Find the first Person without a dog\nrealm.query\u003cPerson\u003e(\"dog == NULL LIMIT(1)\")\n    .first()\n    .find()\n    ?.also { personWithoutDog -\u003e\n        // Add a dog in a transaction\n        realm.writeBlocking {\n            findLatest(personWithoutDog)?.dog = Dog().apply { name = \"Laika\"; age = 3 }\n        }\n    }\n```\n\n## Delete\n\nUse the result of a query to delete from the database.\n\n```Kotlin\n// delete all Dogs\nrealm.writeBlocking {\n    // Selected by a query\n    val query = this.query\u003cDog\u003e()\n    delete(query)\n\n    // From a query result\n    val results = query.find()\n    delete(results)\n\n    // From individual objects\n    results.forEach { delete(it) }\n}\n```\n\n## Observing data changes\n\nRealm support asynchronous observers on all its data structures.\n\n### Realm\n\nA Realm can be observed globally for changes on its data.\n\n```Kotlin\nrealm.asFlow()\n    .collect { realmChange: RealmChange\u003cRealm\u003e -\u003e\n        when (realmChange) {\n            is InitialRealm\u003c*\u003e -\u003e println(\"Initial Realm\")\n            is UpdatedRealm\u003c*\u003e -\u003e println(\"Realm updated\")\n        }\n    }\n```\n\n### RealmObject\n\nRealm objects can be observed individually. A list of the changed field names is provided on each update.\n\n```Kotlin\nperson.asFlow().collect { objectChange: ObjectChange\u003cPerson\u003e -\u003e\n        when (objectChange) {\n            is InitialObject -\u003e println(\"Initial object: ${objectChange.obj.name}\")\n            is UpdatedObject -\u003e \n                println(\"Updated object: ${objectChange.obj.name}, changed fields: ${objectChange.changedFields.size}\")\n            is DeletedObject -\u003e println(\"Deleted object\")\n        }\n    }\n```\n\n### RealmLists\n\nRealm data structures can be observed too. On `RealmList` on each update you receive what positions were inserted, changed or deleted.\n\n```Kotlin\nperson.addresses.asFlow()\n        .collect { listChange: ListChange\u003cString\u003e -\u003e\n            when (listChange) {\n                is InitialList -\u003e println(\"Initial list size: ${listChange.list.size}\")\n                is UpdatedList -\u003e \n                    println(\"Updated list size: ${listChange.list.size} insertions ${listChange.insertions.size}\")\n                is DeletedList -\u003e println(\"Deleted list\")\n            }\n        }\n```\n\n### RealmQuery\n\nQuery results are also observable, and like `RealmList` on each update, the inserted, changed and deleted indices are also provided.\n\n```Kotlin\nrealm.query\u003cPerson\u003e().asFlow()\n    .collect { resultsChange: ResultsChange\u003cPerson\u003e -\u003e\n        when (resultsChange) {\n            is InitialResults -\u003e println(\"Initial results size: ${resultsChange.list.size}\")\n            is UpdatedResults -\u003e \n                println(\"Updated results size: ${resultsChange.list.size} insertions ${resultsChange.insertions.size}\")\n        }\n    }\n```\n\n### RealmSingleQuery\n\nSingle element queries allow observing a `RealmObject` that might not be in the realm.\n\n```Kotlin\nrealm.query\u003cPerson\u003e(\"name = $0\", \"Carlo\").first().asFlow()\n    .collect { objectChange: SingleQueryChange\u003cPerson\u003e -\u003e\n        when (objectChange) {\n            is PendingObject -\u003e println(\"Pending object\")\n            is InitialObject -\u003e println(\"Initial object: ${objectChange.obj.name}\")\n            is UpdatedObject -\u003e \n                println(\"Updated object: ${objectChange.obj.name}, changed fields: ${objectChange.changedFields.size}\")\n            is DeletedObject -\u003e println(\"Deleted object\")\n        }\n    }\n```\n\nNext: head to the full KMM [example](https://github.com/realm/realm-kotlin-samples/tree/main/Bookshelf).  \n\n\n# Using Snapshots\n\nIf you want to test recent bugfixes or features that have not been packaged in an official release yet, you can use a **-SNAPSHOT** release of the current development version of Realm via Gradle, available on [Maven Central](https://oss.sonatype.org/content/repositories/snapshots/io/realm/kotlin/)\n\n## Groovy \n```Gradle\n// Global build.gradle\nbuildscript {\n    repositories {\n        google()\n        mavenCentral()\n        maven {\n            url 'https://oss.sonatype.org/content/repositories/snapshots'\n        }\n    }\n    dependencies {\n        classpath 'io.realm.kotlin:gradle-plugin:\u003cVERSION\u003e'\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n        maven {\n            url 'https://oss.sonatype.org/content/repositories/snapshots'\n        }\n    }\n}\n\n// Module build.gradle\n\n// Don't cache SNAPSHOT (changing) dependencies.\nconfigurations.all {\n    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'\n}\n\napply plugin: \"io.realm.kotlin\"\n```\n\n## Kotlin\n```Kotlin\n// Global build.gradle\n\nbuildscript {\n    dependencies {\n        classpath(\"io.realm.kotlin:gradle-plugin:\u003cVERSION\u003e-SNAPSHOT\")\n    }\n}\n\nrepositories {\n    google()\n    mavenCentral()\n    maven {\n        url = uri(\"https://oss.sonatype.org/content/repositories/snapshots\")\n    }\n}\n\n// Module build.gradle\n\nplugins {\n    id(\"io.realm.kotlin\")\n}\nkotlin {\n    sourceSets {\n        val commonMain  by getting {\n            dependencies {\n                implementation(\"io.realm.kotlin:library-base:\u003cVERSION\u003e-SNAPSHOT\")\n            }\n        }\n    }\n}     \n\n// Don't cache SNAPSHOT (changing) dependencies.\nconfigurations.all {\n    resolutionStrategy.cacheChangingModulesFor(0,TimeUnit.SECONDS)\n}\n```\n\nSee [Config.kt](buildSrc/src/main/kotlin/Config.kt#L20txt) for the latest version number.\n\n# Version Compatibility Matrix\n\nWith Kotlin Multiplatform [still in Beta](https://kotlinlang.org/docs/components-stability.html#current-stability-of-kotlin-components) \nand the Compiler Plugin APIs being experimental, there might be restrictions on what versions of Kotlin the Realm Kotlin\nSDK supports. In the matrix below, you will find the minimum supported version for the dependencies of each Realm release.\n\n| Realm Version | Requirements                                                                                                                                                                                             |\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 2.3.0         | \u003cul\u003e\u003cli\u003eKotlin 2.0.20+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 7.2 - 8.5\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 2.0.0         | \u003cul\u003e\u003cli\u003eKotlin 2.0.0+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 7.2 - 8.5\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.16.0        | \u003cul\u003e\u003cli\u003eKotlin 1.9.0+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 6.8.3 - 8.5\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.15.0        | \u003cul\u003e\u003cli\u003eKotlin 1.9.0+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 6.8.3 - 8.5\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.14.0        | \u003cul\u003e\u003cli\u003eKotlin 1.9.0+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 6.8.3 - 8.5\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.13.0        | \u003cul\u003e\u003cli\u003eKotlin 1.9.0+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 6.8.3 - 8.5\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.12.0        | \u003cul\u003e\u003cli\u003eKotlin 1.8.20+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 6.8.3 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.11.0        | \u003cul\u003e\u003cli\u003eKotlin 1.8.0+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 6.8.3 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.10.0        | \u003cul\u003e\u003cli\u003eKotlin 1.8.0+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.7.0+.\u003c/li\u003e\u003cli\u003eGradle 6.8.3 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.9.0         | \u003cul\u003e\u003cli\u003eKotlin 1.8.0+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.8.3 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.8.0         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.7.1         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20+\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.7.0         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20 - 1.8.10\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.6.1         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20+.\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e         |\n| 1.6.0         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20 - 1.7.21.\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e |\n| 1.5.2         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20 - 1.7.21.\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e |\n| 1.5.1         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20 - 1.7.21.\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e |\n| 1.5.0         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20 - 1.7.21.\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e |\n| 1.4.0         | \u003cul\u003e\u003cli\u003eKotlin 1.7.20 - 1.7.21.\u003c/li\u003e\u003cli\u003eAtomicFu 0.18.3+.\u003c/li\u003e\u003cli\u003eKtor 2.1.2+.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.4+.\u003c/li\u003e\u003cli\u003eGradle 6.7.1 - 7.6.1.\u003c/li\u003e\u003cli\u003eThe new memory model only.\u003c/li\u003e\u003c/ul\u003e |\n| 1.3.0         | \u003cul\u003e\u003cli\u003eKotlin 1.6.10 - 1.7.10.\u003c/li\u003e\u003cli\u003eAtomicFu 0.17.0+.\u003c/li\u003e\u003cli\u003eKtor 1.6.8.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.0-native-mt.\u003c/li\u003e\u003cli\u003eGradle 6.1.1 - 7.6.1.\u003c/li\u003e\u003c/ul\u003e                                |\n| 1.2.0         | \u003cul\u003e\u003cli\u003eKotlin 1.6.10 - 1.7.10.\u003c/li\u003e\u003cli\u003eAtomicFu 0.17.0+.\u003c/li\u003e\u003cli\u003eKtor 1.6.8.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.0-native-mt.\u003c/li\u003e\u003cli\u003eGradle 6.1.1 - 7.6.1.\u003c/li\u003e\u003c/ul\u003e                                |\n| 1.1.0         | \u003cul\u003e\u003cli\u003eKotlin 1.6.10 - 1.7.10.\u003c/li\u003e\u003cli\u003eAtomicFu 0.17.0+.\u003c/li\u003e\u003cli\u003eKtor 1.6.8.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.0-native-mt.\u003c/li\u003e\u003cli\u003eGradle 6.1.1 - 7.6.1.\u003c/li\u003e\u003c/ul\u003e                                |\n| 1.0.2         | \u003cul\u003e\u003cli\u003eKotlin 1.6.10 - 1.7.10.\u003c/li\u003e\u003cli\u003eAtomicFu 0.17.0+.\u003c/li\u003e\u003cli\u003eKtor 1.6.8.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.0-native-mt.\u003c/li\u003e\u003cli\u003eGradle 6.1.1 - 7.6.1.\u003c/li\u003e\u003c/ul\u003e                                |\n| 1.0.1         | \u003cul\u003e\u003cli\u003eKotlin 1.6.10 - 1.7.10.\u003c/li\u003e\u003cli\u003eAtomicFu 0.17.0+.\u003c/li\u003e\u003cli\u003eKtor 1.6.8.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.0-native-mt.\u003c/li\u003e\u003cli\u003eGradle 6.1.1 - 7.6.1.\u003c/li\u003e\u003c/ul\u003e                                |\n| 1.0.0         | \u003cul\u003e\u003cli\u003eKotlin 1.6.10 - 1.7.10.\u003c/li\u003e\u003cli\u003eAtomicFu 0.17.0+.\u003c/li\u003e\u003cli\u003eKtor 1.6.8.\u003c/li\u003e\u003cli\u003eCoroutines 1.6.0-native-mt.\u003c/li\u003e\u003cli\u003eGradle 6.1.1 - 7.6.1.\u003c/li\u003e\u003c/ul\u003e                                |\n\nWhile we strive to be compatible with other plugins and libraries like Android Gradle Plugin, Jetpack Compose\nand Compose Multiplatform, these plugins (and others) have their own version restrictions, so if you are running into \nbuild errors this would be the first thing to check:\n\nYou can find Kotlin version requirements for these libraries and plugins here:\n\n* [Android Gradle Plugin](https://developer.android.com/studio/releases/gradle-plugin)\n* [Jetpack Compose](https://developer.android.com/jetpack/androidx/releases/compose-kotlin)\n* [Compose Multiplatform](https://github.com/JetBrains/compose-jb/blob/master/VERSIONING.md)\n\n\n# Kotlin Memory Model and Coroutine compatibility\n\nRealm Kotlin 1.3.0 and above *only* works with the new Kotlin Native memory model. This is also the default memory model from Kotlin 1.7.20 and onwards. This mean that you need the default Kotlin Coroutine library 1.6.0 and above and not the `-mt` variant, which have also been [deprecated](https://blog.jetbrains.com/kotlin/2021/12/introducing-kotlinx-coroutines-1-6-0/). \n\nSee the `## Compatibility` section of the [CHANGELOG](CHANGELOG.md) for information about exactly which versions are compatible with a given version of Realm Kotlin.\n\nWhen upgrading older projects, it is important to be aware that certain Gradle properties will control the memory model being used. So, if you have the Gradle properties below defined in your project. Make sure they are set to the values shown: \n\n```\nkotlin.native.binary.memoryModel=experimental\nkotlin.native.binary.freezing=disabled\n```\n\nSee https://kotlinlang.org/docs/native-memory-manager.html for more details about the new memory model.\n\n\n# Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for more details!\n\n\n# Code of Conduct\n\nThis project adheres to the [MongoDB Code of Conduct](https://www.mongodb.com/community-code-of-conduct).\nBy participating, you are expected to uphold this code. Please report\nunacceptable behavior to [community-conduct@mongodb.com](mailto:community-conduct@mongodb.com).\n\n\n# License\n\nRealm Kotlin is published under the [Apache 2.0 license](LICENSE).\n\nThis product is not being made available to any person located in Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, or to any other person that is not eligible to receive the product under U.S. law.\n\n\u003cimg style=\"width: 0px; height: 0px;\" src=\"https://3eaz4mshcd.execute-api.us-east-1.amazonaws.com/prod?s=https://github.com/realm/realm-kotlin#README.md\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealm%2Frealm-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealm%2Frealm-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealm%2Frealm-kotlin/lists"}