{"id":371210,"date":"2024-05-21T04:43:01","date_gmt":"2024-05-21T04:43:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=371210"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=371210","title":{"rendered":"<span>Android TOML. \u041f\u0440\u043e\u0441\u0442\u043e \u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 Android Studio<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0415\u0432\u0433\u0435\u043d\u0438\u0439 \u0438 \u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 Android Studio.<\/p>\n<h2>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>29.02.2024 \u0432\u044b\u0448\u043b\u0430 \u0432 stable \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Android Studio &#8212; Iguana. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0441\u043c\u0435\u043d\u043e\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <strong>.toml<\/strong>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ec9\/5b1\/5ae\/ec95b15aeabcec415a509988c20876e7.png\" alt=\"\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Android Studio\" title=\"\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Android Studio\" width=\"1600\" height=\"873\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ec9\/5b1\/5ae\/ec95b15aeabcec415a509988c20876e7.png\"\/><\/p>\n<div><figcaption>\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Android Studio<\/figcaption><\/div>\n<\/figure>\n<p>\u041b\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0442\u0430\u043a \u043a\u0430\u043a\u00a0\u043e\u0431\u00a0\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432\u00a0\u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044f, \u0432\u00a0\u044d\u0442\u043e\u0442 \u0440\u0430\u0437, \u043d\u0435\u00a0\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b, \u0430\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u00ab\u0441 \u043d\u0443\u043b\u044f\u00bb \u0443\u00a0\u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0435\u0434\u043a\u043e, \u043a\u0430\u043a\u00a0\u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043d\u0430\u0434 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438.<\/p>\n<p>\u041d\u043e\u00a0\u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435\u00a0\u0431\u044b\u043b\u043e \u043d\u0435\u0434\u043e\u043b\u0433\u0438\u043c, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u043d\u0430\u00a0\u0431\u043b\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432\u00a0\u043d\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e\u00a0\u0441\u00a0\u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043c\u043d\u0435 \u044d\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e. \u041f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u044f \u0443\u0436\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e, \u0447\u0442\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432 Android Studio.<\/p>\n<pre><code>dependencies {          implementation(libs.androidx.core.ktx)     implementation(libs.androidx.appcompat)     implementation(libs.material)     implementation(libs.androidx.activity)     implementation(libs.androidx.constraintlayout)     testImplementation(libs.junit)     androidTestImplementation(libs.androidx.junit)     androidTestImplementation(libs.androidx.espresso.core) }<\/code><\/pre>\n<p>\u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u043b\u043e\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441\u0442\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u0431\u044b\u043b\u043e \u0434\u043e \u044d\u0442\u043e\u0433\u043e.<\/p>\n<h2>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f<\/h2>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043b\u044e\u0431\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u043d\u0435\u0439 (ctrl + \u041b\u041a\u041d \u043d\u0430 Windows \u0438 Cmd + \u041b\u041a\u041d \u043d\u0430 Mac OS) \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 <strong>libs.versions.toml<\/strong>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/29f\/476\/6b0\/29f4766b049461a5a1b6d47642819e5d.png\" alt=\"\u0421\u043b\u0435\u0432\u0430 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e libs.versions.toml \u043b\u0435\u0436\u0438\u0442 \u0432 Gradle Scripts.\" title=\"\u0421\u043b\u0435\u0432\u0430 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e libs.versions.toml \u043b\u0435\u0436\u0438\u0442 \u0432 Gradle Scripts.\" width=\"1544\" height=\"590\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/29f\/476\/6b0\/29f4766b049461a5a1b6d47642819e5d.png\"\/><\/p>\n<div><figcaption>\u0421\u043b\u0435\u0432\u0430 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e libs.versions.toml \u043b\u0435\u0436\u0438\u0442 \u0432 Gradle Scripts.<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0430:<\/p>\n<p><strong>[versions]<\/strong><\/p>\n<p><strong>[libraries]<\/strong><\/p>\n<p><strong>[plugins]<\/strong><\/p>\n<p>\u0418\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e <em>\u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430<\/em>, <em>\u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c &#8212; \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/em>, <em>\u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/em>.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <strong>String<\/strong>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0438\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0440\u0435\u0437\u0434\u0435\u043b\u0435 [versions]<strong> <\/strong>\u0432\u0441\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d.  \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 room \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 androidx \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0430\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u043e\u0432\u044b\u043c.<\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<h3>\u0421\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u044d\u0442\u043e\u0442 \u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0442\u0430\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0431\u044b \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 KSP \u0432 <strong>build.gradle.kts<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/strong>, \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<\/li>\n<\/ol>\n<pre><code>plugins {     ...     id(\"com.google.devtools.ksp\") version \"1.8.10-1.0.9\" apply false }<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f KSP \u0432 <strong>build.gradle.kts<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u043c\u043e\u0434\u0443\u043b\u044f<\/strong> (\u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c App), \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<pre><code>plugins {     ...     id(\"com.google.devtools.ksp\") }<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 dependencies \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Room, annotationProcessor \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438 Room \u0438 \u0441\u0430\u043c KSP \u0434\u043b\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<pre><code>dependencies {     val room_version = \"2.6.1\"      implementation(\"androidx.room:room-runtime:$room_version\")     annotationProcessor(\"androidx.room:room-compiler:$room_version\")     ksp(\"androidx.room:room-compiler:$room_version\")          ... }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u043e\u0432\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. <\/p>\n<p>\u041a\u0430\u043a \u043f\u043e\u043c\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435, \u0441\u0442\u0430\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <\/p>\n<p><code>implementation(\"androidx.room:room-runtime:2.6.1)<\/code><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c:<\/p>\n<p><strong>implementation<\/strong> &#8212; \u0441\u0430\u043c \u043c\u0435\u0442\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c<\/p>\n<p><strong>androidx.room<\/strong> &#8212; \u043f\u0430\u043a\u0435\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043b\u0435\u0436\u0438\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/p>\n<p><strong>room-runtime<\/strong> &#8212; \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/p>\n<p><strong>2.6.1<\/strong> &#8212; \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043e\u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u0438 \u0432 \u043d\u043e\u0432\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <strong>.toml<\/strong>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/f32\/9c7\/6ab\/f329c76aba4cb4875c2845d4953de05b.jpg\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0432 .toml\" title=\"\u0421\u0445\u0435\u043c\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0432 .toml\" width=\"1100\" height=\"724\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f32\/9c7\/6ab\/f329c76aba4cb4875c2845d4953de05b.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0432 .toml<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>[libraries]<\/strong> \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u0442\u0435\u043a\u0438 Room \u0438 \u0435\u0435 \u0432\u0435\u0440\u0441\u0438\u044e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>[versions]<\/strong>.<\/p>\n<p><strong>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/strong> &#8212; \u0442\u043e, \u043a\u0430\u043a \u043c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u0418\u043c\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435, \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <strong>kebab-case<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c, \u0447\u0435\u0440\u0435\u0437 &#171;-&#187; (\u0434\u0435\u0444\u0438\u0441 \u0438\u043b\u0438 \u0442\u0438\u0440\u0435).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 (\u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445) \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>group<\/strong> &#8212; \u0442\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <strong>\u043f\u0430\u043a\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Room \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0430\u043a\u0435\u0442 androix.room, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a. <strong>\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/strong><\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>name<\/strong> &#8212; \u044d\u0442\u043e <strong>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong>.<\/p>\n<p>\u0418 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>version.ref<\/strong> &#8212; \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0421\u0430\u043c\u043e \u0436\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>[versions]<\/strong> \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 <strong>camelCase<\/strong>. \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 <strong>build.gradle.kts<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/strong>\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d KSP (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u043e\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 [plugins]). \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<pre><code>plugins {     ...     alias(libs.plugins.ksp) apply false }<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 <strong>build.gradle.kts<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u043c\u043e\u0434\u0443\u043b\u044f <\/strong>\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d KSP. \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<pre><code>plugins {     ...     alias(libs.plugins.ksp) }<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0436\u0435 \u0444\u0430\u0439\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u043f\u0443\u0442\u044c \u043a \u043d\u0438\u043c \u0432 \u0431\u043b\u043e\u043a\u0435 dependencies:<\/p>\n<pre><code>dependencies {      implementation(libs.androidx.room)     annotationProcessor(libs.androidx.room.annotation.processor)     ksp(libs.androidx.room.annotation.processor) <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 .toml \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u0444\u0438\u0441, <strong>\u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0432 build.gradle.kts \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0443<\/strong>.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443:<\/p>\n<pre><code>package com.gorovoyeg.newproject  import androidx.room.ColumnInfo import androidx.room.Dao import androidx.room.Database import androidx.room.Entity import androidx.room.PrimaryKey import androidx.room.Query import androidx.room.RoomDatabase  @Database(entities = [TestEntity::class] , version = 1, exportSchema = false) abstract class TestDatabase: RoomDatabase() {      abstract fun testDao(): TestDao }  @Dao interface TestDao {      @Query(\"SELECT * FROM test_entity\")     fun testFunAll(): TestEntity }  @Entity(tableName = \"test_entity\") data class TestEntity(     @PrimaryKey(autoGenerate = true) val testId: Int,     @ColumnInfo(name = \"test_name\" ) val testName: String )<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u043e.<\/p>\n<h2>\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u0438\u0442\u043e\u0433\u0438<\/h2>\n<p>\u041a\u0430\u043a \u044f \u0438 \u043f\u043e\u0434\u043a\u0447\u0435\u0440\u043a\u043d\u0443\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 libs.versions.toml \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Android Studio \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0430\u044f \u043c\u0435\u0440\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Google. \u0414\u043b\u044f \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u044d\u0442\u043e \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u043d\u0435\u0430\u043a\u0442\u0443\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0447\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0432 \u0431\u043b\u043e\u043a dependencies \u0432 build.gradle. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u043b\u0438 \u043d\u0435\u0442 &#8212; \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435. \u041b\u0438\u0447\u043d\u043e \u044f \u0431\u0443\u0434\u0443 \ud83d\ude42<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/801287\/\"> https:\/\/habr.com\/ru\/articles\/801287\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0415\u0432\u0433\u0435\u043d\u0438\u0439 \u0438 \u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 Android Studio.<\/p>\n<h2>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>29.02.2024 \u0432\u044b\u0448\u043b\u0430 \u0432 stable \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Android Studio &#8212; Iguana. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0441\u043c\u0435\u043d\u043e\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <strong>.toml<\/strong>.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Android Studio<\/figcaption><\/div>\n<\/figure>\n<p>\u041b\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0442\u0430\u043a \u043a\u0430\u043a\u00a0\u043e\u0431\u00a0\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432\u00a0\u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044f, \u0432\u00a0\u044d\u0442\u043e\u0442 \u0440\u0430\u0437, \u043d\u0435\u00a0\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b, \u0430\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u00ab\u0441 \u043d\u0443\u043b\u044f\u00bb \u0443\u00a0\u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0435\u0434\u043a\u043e, \u043a\u0430\u043a\u00a0\u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043d\u0430\u0434 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438.<\/p>\n<p>\u041d\u043e\u00a0\u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435\u00a0\u0431\u044b\u043b\u043e \u043d\u0435\u0434\u043e\u043b\u0433\u0438\u043c, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u043d\u0430\u00a0\u0431\u043b\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432\u00a0\u043d\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e\u00a0\u0441\u00a0\u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043c\u043d\u0435 \u044d\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e. \u041f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u044f \u0443\u0436\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e, \u0447\u0442\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432 Android Studio.<\/p>\n<pre><code>dependencies {          implementation(libs.androidx.core.ktx)     implementation(libs.androidx.appcompat)     implementation(libs.material)     implementation(libs.androidx.activity)     implementation(libs.androidx.constraintlayout)     testImplementation(libs.junit)     androidTestImplementation(libs.androidx.junit)     androidTestImplementation(libs.androidx.espresso.core) }<\/code><\/pre>\n<p>\u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u043b\u043e\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441\u0442\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u0431\u044b\u043b\u043e \u0434\u043e \u044d\u0442\u043e\u0433\u043e.<\/p>\n<h2>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f<\/h2>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043b\u044e\u0431\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u043d\u0435\u0439 (ctrl + \u041b\u041a\u041d \u043d\u0430 Windows \u0438 Cmd + \u041b\u041a\u041d \u043d\u0430 Mac OS) \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 <strong>libs.versions.toml<\/strong>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043b\u0435\u0432\u0430 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e libs.versions.toml \u043b\u0435\u0436\u0438\u0442 \u0432 Gradle Scripts.<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0430:<\/p>\n<p><strong>[versions]<\/strong><\/p>\n<p><strong>[libraries]<\/strong><\/p>\n<p><strong>[plugins]<\/strong><\/p>\n<p>\u0418\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e <em>\u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430<\/em>, <em>\u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c &#8212; \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/em>, <em>\u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/em>.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <strong>String<\/strong>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0438\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0440\u0435\u0437\u0434\u0435\u043b\u0435 [versions]<strong> <\/strong>\u0432\u0441\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d.  \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 room \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 androidx \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0430\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u043e\u0432\u044b\u043c.<\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<h3>\u0421\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u044d\u0442\u043e\u0442 \u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0442\u0430\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0431\u044b \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 KSP \u0432 <strong>build.gradle.kts<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/strong>, \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<\/li>\n<\/ol>\n<pre><code>plugins {     ...     id(\"com.google.devtools.ksp\") version \"1.8.10-1.0.9\" apply false }<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f KSP \u0432 <strong>build.gradle.kts<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u043c\u043e\u0434\u0443\u043b\u044f<\/strong> (\u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c App), \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<pre><code>plugins {     ...     id(\"com.google.devtools.ksp\") }<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 dependencies \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Room, annotationProcessor \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438 Room \u0438 \u0441\u0430\u043c KSP \u0434\u043b\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<pre><code>dependencies {     val room_version = \"2.6.1\"      implementation(\"androidx.room:room-runtime:$room_version\")     annotationProcessor(\"androidx.room:room-compiler:$room_version\")     ksp(\"androidx.room:room-compiler:$room_version\")          ... }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u043e\u0432\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431<\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. <\/p>\n<p>\u041a\u0430\u043a \u043f\u043e\u043c\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435, \u0441\u0442\u0430\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <\/p>\n<p><code>implementation(\"androidx.room:room-runtime:2.6.1)<\/code><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c:<\/p>\n<p><strong>implementation<\/strong> &#8212; \u0441\u0430\u043c \u043c\u0435\u0442\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c<\/p>\n<p><strong>androidx.room<\/strong> &#8212; \u043f\u0430\u043a\u0435\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043b\u0435\u0436\u0438\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/p>\n<p><strong>room-runtime<\/strong> &#8212; \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/p>\n<p><strong>2.6.1<\/strong> &#8212; \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043e\u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u0438 \u0432 \u043d\u043e\u0432\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <strong>.toml<\/strong>:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0432 .toml<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>[libraries]<\/strong> \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u0442\u0435\u043a\u0438 Room \u0438 \u0435\u0435 \u0432\u0435\u0440\u0441\u0438\u044e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>[versions]<\/strong>.<\/p>\n<p><strong>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/strong> &#8212; \u0442\u043e, \u043a\u0430\u043a \u043c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u0418\u043c\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435, \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <strong>kebab-case<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c, \u0447\u0435\u0440\u0435\u0437 &#171;-&#187; (\u0434\u0435\u0444\u0438\u0441 \u0438\u043b\u0438 \u0442\u0438\u0440\u0435).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 (\u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445) \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>group<\/strong> &#8212; \u0442\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <strong>\u043f\u0430\u043a\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Room \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0430\u043a\u0435\u0442 androix.room, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a. <strong>\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/strong><\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>name<\/strong> &#8212; \u044d\u0442\u043e <strong>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/strong>.<\/p>\n<p>\u0418 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>version.ref<\/strong> &#8212; \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0421\u0430\u043c\u043e \u0436\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>[versions]<\/strong> \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 <strong>camelCase<\/strong>. \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 <strong>build.gradle.kts<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/strong>\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d KSP (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u043e\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 [plugins]). \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<pre><code>plugins {     ...     alias(libs.plugins.ksp) apply false }<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 <strong>build.gradle.kts<\/strong> \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u043c\u043e\u0434\u0443\u043b\u044f <\/strong>\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d KSP. \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<pre><code>plugins {     ...     alias(libs.plugins.ksp) }<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0436\u0435 \u0444\u0430\u0439\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u043f\u0443\u0442\u044c \u043a \u043d\u0438\u043c \u0432 \u0431\u043b\u043e\u043a\u0435 dependencies:<\/p>\n<pre><code>dependencies {      implementation(libs.androidx.room)     annotationProcessor(libs.androidx.room.annotation.processor)     ksp(libs.androidx.room.annotation.processor) <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 .toml \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u0444\u0438\u0441, <strong>\u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0432 build.gradle.kts \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0443<\/strong>.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443:<\/p>\n<pre><code>package com.gorovoyeg.newproject  import androidx.room.ColumnInfo import androidx.room.Dao import androidx.room.Database import androidx.room.Entity import androidx.room.PrimaryKey import androidx.room.Query import androidx.room.RoomDatabase  @Database(entities = [TestEntity::class] , version = 1, exportSchema = false) abstract class TestDatabase: RoomDatabase() {      abstract fun testDao(): TestDao }  @Dao interface TestDao {      @Query(\"SELECT * FROM test_entity\")     fun testFunAll(): TestEntity }  @Entity(tableName = \"test_entity\") data class TestEntity(     @PrimaryKey(autoGenerate = true) val testId: Int,     @ColumnInfo(name = \"test_name\" ) val testName: String )<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u043e.<\/p>\n<h2>\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u0438\u0442\u043e\u0433\u0438<\/h2>\n<p>\u041a\u0430\u043a \u044f \u0438 \u043f\u043e\u0434\u043a\u0447\u0435\u0440\u043a\u043d\u0443\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 libs.versions.toml \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Android Studio \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0430\u044f \u043c\u0435\u0440\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Google. \u0414\u043b\u044f \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u044d\u0442\u043e \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u043d\u0435\u0430\u043a\u0442\u0443\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0447\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0432 \u0431\u043b\u043e\u043a dependencies \u0432 build.gradle. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043a \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u043b\u0438 \u043d\u0435\u0442 &#8212; \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435. \u041b\u0438\u0447\u043d\u043e \u044f \u0431\u0443\u0434\u0443 \ud83d\ude42<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/801287\/\"> https:\/\/habr.com\/ru\/articles\/801287\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-371210","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=371210"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371210\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}