{"id":427408,"date":"2024-07-25T21:57:33","date_gmt":"2024-07-25T21:57:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=427408"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=427408","title":{"rendered":"<span>\u041a\u0430\u043a \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442 Composable \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/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\u043e\u0437\u043d\u0438\u043a\u0430\u043b \u043b\u0438 \u0443 \u0442\u0435\u0431\u044f \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0432\u043e \u0447\u0442\u043e Compose compiler \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0448\u0438 Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0442\u044b \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u0445\u043e\u0447\u0435\u0448\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u0442\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u0448\u044c? \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u0442\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443. \u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u0431\u0430\u043a\u0430\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0442\u0435\u0445\u043b\u0438\u0434\u043e\u043c \u0432 \u0410\u043b\u044c\u0444\u0430-\u0411\u0430\u043d\u043a\u0435. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@Composable<\/code>. <\/p>\n<p><strong>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0440\u0435\u043c\u0430\u0440\u043a\u0430<\/strong>: Compose compiler \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 <a href=\"https:\/\/github.com\/JetBrains\/kotlin\/tree\/master\/plugins\/compose\">Kotlin<\/a> \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Kotlin 2.0 Jetbrains \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u043f\u0443\u0441\u043a\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Compose.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d7a\/9f6\/700\/d7a9f6700214e86e14a444d712161ec4.png\" width=\"3200\" height=\"1800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d7a\/9f6\/700\/d7a9f6700214e86e14a444d712161ec4.png\"\/><\/figure>\n<h2>Compose \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d<\/h2>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0410 \u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 annotation processor?\u00bb. \u0414\u0430\u0432\u0430\u0439 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<blockquote>\n<p>Compiler Plugin \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Kotlin. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043a\u043e\u0434\u0430. \u041a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.<\/p>\n<p>Annotation Processor \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u043b\u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/blockquote>\n<p>\u0414\u0430\u0432\u0430\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0451\u043c <a href=\"https:\/\/dagger.dev\/dev-guide\/\">Dagger2<\/a>.  <\/p>\n<ul>\n<li>\n<p>Annotation Processor \u0434\u0430\u0433\u0433\u0435\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e. <\/p>\n<\/li>\n<li>\n<p>\u041d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c Annotation Processor \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 (\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430 \u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438 \u043c\u0430\u0433\u0438\u044e \u0441 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c AST, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b\u0442\u0432\u043e\u0440\u044f\u0435\u0442 <a href=\"https:\/\/github.com\/projectlombok\/lombok\">Lombok<\/a>), \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442\u00a0\u0440\u0430\u0437\u043d\u0438\u0446\u0430.<\/p>\n<blockquote>\n<p>Compose \u2014 \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<\/blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong>. \u041d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e, \u0447\u0442\u043e Compose \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 Compose Runtime, Compose UI \u0438 Compose Compiler. \u041f\u043e \u0441\u0443\u0442\u0438 Compose Runtime \u0438 Compose Compiler \u2014 \u044d\u0442\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438. Compose UI \u2014 \u044d\u0442\u043e \u0442\u0443\u043b\u043a\u0438\u0442 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438\u043a\u043e\u0432 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044e \u0441 View \u0442\u0443\u043b\u043a\u0438\u0442\u043e\u043c \u0432 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0435). \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u2014 Compose. \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u2014 <a href=\"https:\/\/jakewharton.com\/a-jetpack-compose-by-any-other-name\/\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a>. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445.<\/p>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u0442\u0435\u043c\u0430 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0438 \u043e\u0431\u0432\u0435\u0441\u044b \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0438\u0445 (compiler plugins, annotation processors \u0438 \u0442.\u0434), \u043c\u043e\u0433\u0443 \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0443:<\/p>\n<ul>\n<li>\n<p>\u00ab\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b: \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b, \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b\u00bb, \u0410\u0445\u043e, \u0423\u043b\u044c\u043c\u0430\u043d, \u041b\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u00ab\u0422\u0435\u043e\u0440\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432\u00bb, \u0422\u043e\u043c \u0421\u0442\u044e\u0430\u0440\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0438\u0448\u0435\u043c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 Compose, \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043c, \u0433\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@Composable<\/code>. <\/p>\n<h2>\u0410 \u043a\u0430\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0432\u043e \u0447\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0448\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438?<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bc6\/e4d\/0a7\/bc6e4d0a7b748bf62c46d09afbae64a0.png\" alt=\"Magic\" title=\"Magic\" width=\"600\" height=\"300\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bc6\/e4d\/0a7\/bc6e4d0a7b748bf62c46d09afbae64a0.png\"\/><\/p>\n<div><figcaption>Magic<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 GitHub \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u0435\u0441\u0442\u044c gradle \u043f\u043b\u0430\u0433\u0438\u043d \u2014 <a href=\"https:\/\/github.com\/takahirom\/decomposer\">decomposer<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u043b\u0435\u0433\u043a\u043e\u043c \u0434\u0435\u043b\u0435 (\u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c). <\/p>\n<p><strong>\u0412\u0430\u0436\u043d\u044b\u0439 \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/strong>: \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Android Studio. \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 Koala \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 Show Kotlin bytecode. \u041d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043b\u0430\u0433\u0438\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"kotlin\">class ExampleActivity : ComponentActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContent {             Example()         }     } }  @Composable fun Example() {     println(\"make compose great again\") }<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0432\u043e \u0447\u0442\u043e \u0435\u0433\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442 Compose-\u043f\u043b\u0430\u0433\u0438\u043d:<\/p>\n<pre><code class=\"kotlin\">public final class ExampleActivityKt {    @Composable    public static final void Example(@Nullable Composer $composer, final int $changed) {       \/\/ \u0442\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f restartable \u0433\u0440\u0443\u043f\u043f\u0430       $composer = $composer.startRestartGroup(-259780235);       ComposerKt.sourceInformation($composer, \"C(Example):ExampleActivity.kt#64jxz8\");       if ($changed == 0 &amp;&amp; $composer.getSkipping()) {         \/\/ \u0442\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f skippable \u0433\u0440\u0443\u043f\u043f\u0430         \/\/ \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0421ompose, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c         \/\/ \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430          $composer.skipToGroupEnd();        } else {          if (ComposerKt.isTraceInProgress()) {             ComposerKt.traceEventStart(-259780235, $changed, -1, \"com.abocha.composemetrics.Example (ExampleActivity.kt:17)\");          }           \/\/ \u0412\u043e\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u0430\u043c\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438, \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435          \/\/ \u044d\u0442\u043e \u043e\u0431\u0432\u0435\u0441\u044b \u043e\u0442 Compose \u043f\u043b\u0430\u0433\u0438\u043d\u0430          System.out.println(\"make compose great again\");                   if (ComposerKt.isTraceInProgress()) {             ComposerKt.traceEventEnd();          }       }        ScopeUpdateScope var10000 = $composer.endRestartGroup();       if (var10000 != null) {          var10000.updateScope((Function2)(new Function2() {             public final void invoke(@Nullable Composer $composer, int $force) {                ExampleActivityKt.Example($composer, RecomposeScopeImplKt.updateChangedFlags($changed | 1));             }          }));       }     } }<\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0441 \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u0434\u043e\u043c Compose compiler. \u041d\u043e \u0443\u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u0430\u0436\u0435 \u043d\u0430 \u043f\u0443\u0441\u0442\u0443\u044e Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u044e. <\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043d\u0430 \u0447\u0451\u043c \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0437\u0430\u043e\u0441\u0442\u0440\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0442\u0430\u043a \u044d\u0442\u043e \u043d\u0430 <code>$composer.skipToGroupEnd()<\/code> \u0438 <code>$composer.startRestartGroup(-259780235)<\/code>. \u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0433\u0440\u0443\u0431\u043e, \u0442\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 <code>skipToGroupEnd<\/code> \u2014 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u043b\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"https:\/\/jorgecastillo.dev\/book\/\">Jetpack Compose internals<\/a>).<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0439\u0434\u0451\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432 \u043d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<pre><code class=\"kotlin\">@Composable fun Example() {   \/\/ \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 composable \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Text     Text(\"make compose great again\") }<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (\u043f\u043e\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u044f): <\/p>\n<pre><code class=\"kotlin\">public final class ExampleActivityKt {    @Composable    @ComposableTarget(       applier = \"androidx.compose.ui.UiComposable\"    )    public static final void Example(@Nullable Composer $composer, final int $changed) {           \/\/ \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0443\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u043b\u043e\u0433          \/\/ \u0432\u044b\u0437\u0432\u044b\u0430\u0435\u0442\u0441\u044f Composable \u0444\u0443\u043a\u043d\u0446\u0438\u044f Text, \u0432\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0448\u0435 \u0438 \u043d\u0438\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439          TextKt.Text--4IGK_g(\"make compose great again\", (Modifier)null, 0L, 0L, (FontStyle)null, (FontWeight)null, (FontFamily)null, 0L, (TextDecoration)null, (TextAlign)null, 0L, 0, false, 0, 0, (Function1)null, (TextStyle)null, $composer, 6, 0, 131070); }<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0432 \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e: <\/p>\n<pre><code class=\"kotlin\">@Composable fun Example(text: String) {     Text(text) }<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"kotlin\">public final class ExampleActivityKt {    @Composable    @ComposableTarget(       applier = \"androidx.compose.ui.UiComposable\"    )    \/\/ \u041f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438    public static final void Example(@NotNull final String text, @Nullable Composer $composer, final int $changed) {     \/\/... \u0442\u0443\u0442 \u0432\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435, skippable \u0433\u0440\u0443\u043f\u043f\u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f }<\/code><\/pre>\n<p>String \u2014  \u044d\u0442\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e. \u0423 \u043d\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c skipable-\u0433\u0440\u0443\u043f\u043f\u0430. <\/p>\n<p>\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0432 \u043d\u0430\u0448\u0443 Composable \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440? <\/p>\n<pre><code class=\"kotlin\">class ExampleActivity : ComponentActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContent {             Example(listOf(\"make compose great again\"))         }     } }  @Composable \/\/ \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 fun Example(texts: List&lt;String&gt;) {     Text(texts.toString()) }<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong>. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/companies\/ozontech\/articles\/742854\/#2.2\">\u041e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f Compose<\/a> \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442: <\/p>\n<pre><code class=\"kotlin\">public final class ExampleActivityKt {    @Composable    @ComposableTarget(       applier = \"androidx.compose.ui.UiComposable\"    )    public static final void Example(@NotNull final List texts, @Nullable Composer $composer, final int $changed) {       Intrinsics.checkNotNullParameter(texts, \"texts\");       $composer = $composer.startRestartGroup(1558598647);       \/\/ \u0422\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e restart \u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f, \u0430 \u0432\u043e\u0442 skippable \u0443\u0436\u0435 \u043d\u0435\u0442 !!       ComposerKt.sourceInformation($composer, \"C(Example)19@523L22:ExampleActivity.kt#64jxz8\");       if (ComposerKt.isTraceInProgress()) {          ComposerKt.traceEventStart(1558598647, $changed, -1, \"com.abocha.composemetrics.Example (ExampleActivity.kt:18)\");       }        TextKt.Text--4IGK_g(texts.toString(), (Modifier)null, 0L, 0L, (FontStyle)null, (FontWeight)null, (FontFamily)null, 0L, (TextDecoration)null, (TextAlign)null, 0L, 0, false, 0, 0, (Function1)null, (TextStyle)null, $composer, 0, 0, 131070);       if (ComposerKt.isTraceInProgress()) {          ComposerKt.traceEventEnd();       }        ScopeUpdateScope var10000 = $composer.endRestartGroup();       if (var10000 != null) {          var10000.updateScope((Function2)(new Function2() {             public final void invoke(@Nullable Composer $composer, int $force) {                ExampleActivityKt.Example(texts, $composer, RecomposeScopeImplKt.updateChangedFlags($changed | 1));             }          }));       }    } }<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u043f\u0430\u043b\u0430 skipable-\u0433\u0440\u0443\u043f\u043f\u0430. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/chrisbanes.me\/posts\/composable-metrics\/\">Compose metrics<\/a>.<\/p>\n<h2>\u0410 \u043a\u0430\u043a \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 graddle-\u043f\u043b\u0430\u0433\u0438\u043d?<\/h2>\n<p>\u041d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e, \u043a\u0430\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b:<\/p>\n<pre><code class=\"kotlin\">class DecomposerPlugin:Plugin&lt;Project&gt; {     override fun apply(project: Project) {         project.tasks.withType&lt;KotlinCompile&gt;()             .whenTaskAdded {                 val kotlinCompileTask: KotlinCompile = this                 this.doLast {                     val kotlinFiles = kotlinCompileTask.destinationDirectory.asFileTree.files                         .map{it.absolutePath} \/\/ \u0442\u0443\u0442 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u043a\u043e\u0442\u043b\u0438\u043d \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430                     val output = File(project.buildDir,\"decompiled\").apply {                         deleteRecursively()                         mkdir()                     } \/\/ \u0442\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 \u0433\u0434\u0435 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b                     val options: MutableList&lt;String&gt; = kotlinFiles.toMutableList()                         .apply{add(output.absolutePath)}                     ConsoleDecompiler.main(options.toTypedArray())                     \/\/ \u0432\u043e\u0442 \u0442\u0443\u0442 \u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f                     output.listFiles()                         ?.filter { !it.readText().contains(\"androidx.compose\") }                         ?.forEach {                             it.delete()                         }                     logger.log(LogLevel.LIFECYCLE, \"DecomposerPlugin: decomposed in ${output.path}\")                 }             }     } }<\/code><\/pre>\n<p>\u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0432\u044b\u0434\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/JetBrains\/intellij-community\/blob\/master\/plugins\/java-decompiler\/engine\/src\/org\/jetbrains\/java\/decompiler\/main\/decompiler\/ConsoleDecompiler.java\">ConsoleDecompiler<\/a>. \u0412\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 Compose.<\/p>\n<p>ConsoleDecompiler \u2014\u00a0\u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0442\u0443\u043b\u0437\u0430 \u0438 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043a Compose. \u0415\u0451 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 suspend-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. \u041d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c suspend-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0447\u0435\u0440\u0435\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 IDE:<\/p>\n<pre><code class=\"kotlin\">class ExampleActivity : ComponentActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         lifecycleScope.launch { kek() }     }      private suspend fun kek() {         delay(500)         println(\"great again\")     } }\u0410<\/code><\/pre>\n<p>\u0412\u043e\u0442, \u0447\u0442\u043e \u043d\u0430\u043c \u0432\u044b\u0434\u0430\u0441\u0442 <a href=\"https:\/\/github.com\/JetBrains\/intellij-community\/blob\/master\/plugins\/java-decompiler\/engine\/src\/org\/jetbrains\/java\/decompiler\/main\/decompiler\/ConsoleDecompiler.java\">ConsoleDecompiler<\/a>: <\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043b\u044f\u043d\u0438, \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"kotlin\">public final class ExampleActivity extends ComponentActivity {    public static final int $stable;     protected void onCreate(@Nullable Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       BuildersKt.launch$default((CoroutineScope)LifecycleOwnerKt.getLifecycleScope((LifecycleOwner)this), (CoroutineContext)null, (CoroutineStart)null, (Function2)(new Function2((Continuation)null) {          int label;           @Nullable          public final Object invokeSuspend(@NotNull Object $result) {             Object var2 = IntrinsicsKt.getCOROUTINE_SUSPENDED();             switch(this.label) {             case 0:                ResultKt.throwOnFailure($result);                ExampleActivity var10000 = ExampleActivity.this;                Continuation var10001 = (Continuation)this;                this.label = 1;                if (var10000.kek(var10001) == var2) {                   return var2;                }                break;             case 1:                ResultKt.throwOnFailure($result);                break;             default:                throw new IllegalStateException(\"call to 'resume' before 'invoke' with coroutine\");             }              return Unit.INSTANCE;          }           @NotNull          public final Continuation create(@Nullable Object value, @NotNull Continuation $completion) {             return (Continuation)(new &lt;anonymous constructor&gt;($completion));          }           @Nullable          public final Object invoke(@NotNull CoroutineScope p1, @Nullable Continuation p2) {             return ((&lt;undefinedtype&gt;)this.create(p1, p2)).invokeSuspend(Unit.INSTANCE);          }       }), 3, (Object)null);    }     private final Object kek(Continuation var1) {       Object $continuation;       label20: {          if (var1 instanceof &lt;undefinedtype&gt;) {             $continuation = (&lt;undefinedtype&gt;)var1;             if ((((&lt;undefinedtype&gt;)$continuation).label &amp; Integer.MIN_VALUE) != 0) {                ((&lt;undefinedtype&gt;)$continuation).label -= Integer.MIN_VALUE;                break label20;             }          }           $continuation = new ContinuationImpl(var1) {             \/\/ $FF: synthetic field             Object result;             int label;              @Nullable             public final Object invokeSuspend(@NotNull Object $result) {                this.result = $result;                this.label |= Integer.MIN_VALUE;                return ExampleActivity.this.kek((Continuation)this);             }          };       }        Object $result = ((&lt;undefinedtype&gt;)$continuation).result;       Object var4 = IntrinsicsKt.getCOROUTINE_SUSPENDED();       switch(((&lt;undefinedtype&gt;)$continuation).label) {       case 0:          ResultKt.throwOnFailure($result);          ((&lt;undefinedtype&gt;)$continuation).label = 1;          if (DelayKt.delay(500L, (Continuation)$continuation) == var4) {             return var4;          }          break;       case 1:          ResultKt.throwOnFailure($result);          break;       default:          throw new IllegalStateException(\"call to 'resume' before 'invoke' with coroutine\");       }        System.out.println(\"great again\");       return Unit.INSTANCE;    } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/26a\/819\/58f\/26a81958fdb365ff7ad876be9efdfbfb.png\" width=\"1200\" height=\"798\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/26a\/819\/58f\/26a81958fdb365ff7ad876be9efdfbfb.png\"\/><\/figure>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0432\u043e \u0447\u0442\u043e Compose Compiler \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0448\u0438 Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430\u0434\u043e, \u0438\u043b\u0438 \u043d\u0435\u0442).<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431. \u0415\u0449\u0451 \u0435\u0441\u0442\u044c <a href=\"https:\/\/chrisbanes.me\/posts\/composable-metrics\/\">Compose metrics<\/a> \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 Android Studio:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\/tooling\/tracing\">Composition Tracing<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/701422\/\">\u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f Compose<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c \u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b Compose \u043a\u043e\u043c\u043f\u0430\u0439\u043b\u0435\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.<\/p>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432:<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=VX6nAvRWQg4\">How Compose UI Works<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=6BRlI5zfCCk\">The Compose Runtime, Demystified by Leland Richardson<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=FoigykeQOMM&amp;t=101s\">\u00a0\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b: \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0421ompose<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=kcYa9xg8WAE\">@Stable vs @Immutable \u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 Compose<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/t.me\/mobile_compose\">\u0421\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u043a\u0430\u043d\u0430\u043b \u043e compose<\/a><\/p>\n<\/li>\n<\/ul>\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\/827510\/\"> https:\/\/habr.com\/ru\/articles\/827510\/<\/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\u043e\u0437\u043d\u0438\u043a\u0430\u043b \u043b\u0438 \u0443 \u0442\u0435\u0431\u044f \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0432\u043e \u0447\u0442\u043e Compose compiler \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0448\u0438 Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0442\u044b \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u0445\u043e\u0447\u0435\u0448\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u0442\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u0448\u044c? \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u0442\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443. \u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u0431\u0430\u043a\u0430\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0442\u0435\u0445\u043b\u0438\u0434\u043e\u043c \u0432 \u0410\u043b\u044c\u0444\u0430-\u0411\u0430\u043d\u043a\u0435. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@Composable<\/code>. <\/p>\n<p><strong>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0440\u0435\u043c\u0430\u0440\u043a\u0430<\/strong>: Compose compiler \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 <a href=\"https:\/\/github.com\/JetBrains\/kotlin\/tree\/master\/plugins\/compose\">Kotlin<\/a> \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Kotlin 2.0 Jetbrains \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u043f\u0443\u0441\u043a\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Compose.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>Compose \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d<\/h2>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0410 \u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 annotation processor?\u00bb. \u0414\u0430\u0432\u0430\u0439 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<blockquote>\n<p>Compiler Plugin \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 Kotlin. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043a\u043e\u0434\u0430. \u041a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.<\/p>\n<p>Annotation Processor \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u043b\u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/blockquote>\n<p>\u0414\u0430\u0432\u0430\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0451\u043c <a href=\"https:\/\/dagger.dev\/dev-guide\/\">Dagger2<\/a>.  <\/p>\n<ul>\n<li>\n<p>Annotation Processor \u0434\u0430\u0433\u0433\u0435\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e. <\/p>\n<\/li>\n<li>\n<p>\u041d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c Annotation Processor \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 (\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430 \u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438 \u043c\u0430\u0433\u0438\u044e \u0441 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c AST, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b\u0442\u0432\u043e\u0440\u044f\u0435\u0442 <a href=\"https:\/\/github.com\/projectlombok\/lombok\">Lombok<\/a>), \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442\u00a0\u0440\u0430\u0437\u043d\u0438\u0446\u0430.<\/p>\n<blockquote>\n<p>Compose \u2014 \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<\/blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong>. \u041d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e, \u0447\u0442\u043e Compose \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 Compose Runtime, Compose UI \u0438 Compose Compiler. \u041f\u043e \u0441\u0443\u0442\u0438 Compose Runtime \u0438 Compose Compiler \u2014 \u044d\u0442\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438. Compose UI \u2014 \u044d\u0442\u043e \u0442\u0443\u043b\u043a\u0438\u0442 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438\u043a\u043e\u0432 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044e \u0441 View \u0442\u0443\u043b\u043a\u0438\u0442\u043e\u043c \u0432 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0435). \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u2014 Compose. \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u2014 <a href=\"https:\/\/jakewharton.com\/a-jetpack-compose-by-any-other-name\/\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a>. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445.<\/p>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u0442\u0435\u043c\u0430 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0438 \u043e\u0431\u0432\u0435\u0441\u044b \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0438\u0445 (compiler plugins, annotation processors \u0438 \u0442.\u0434), \u043c\u043e\u0433\u0443 \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0443:<\/p>\n<ul>\n<li>\n<p>\u00ab\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b: \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b, \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b\u00bb, \u0410\u0445\u043e, \u0423\u043b\u044c\u043c\u0430\u043d, \u041b\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u00ab\u0422\u0435\u043e\u0440\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432\u00bb, \u0422\u043e\u043c \u0421\u0442\u044e\u0430\u0440\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0438\u0448\u0435\u043c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 Compose, \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043c, \u0433\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@Composable<\/code>. <\/p>\n<h2>\u0410 \u043a\u0430\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0432\u043e \u0447\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0448\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438?<\/h2>\n<figure class=\"full-width\">\n<div><figcaption>Magic<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 GitHub \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u0435\u0441\u0442\u044c gradle \u043f\u043b\u0430\u0433\u0438\u043d \u2014 <a href=\"https:\/\/github.com\/takahirom\/decomposer\">decomposer<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u043b\u0435\u0433\u043a\u043e\u043c \u0434\u0435\u043b\u0435 (\u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c). <\/p>\n<p><strong>\u0412\u0430\u0436\u043d\u044b\u0439 \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/strong>: \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Android Studio. \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 Koala \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 Show Kotlin bytecode. \u041d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043b\u0430\u0433\u0438\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"kotlin\">class ExampleActivity : ComponentActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContent {             Example()         }     } }  @Composable fun Example() {     println(\"make compose great again\") }<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0432\u043e \u0447\u0442\u043e \u0435\u0433\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442 Compose-\u043f\u043b\u0430\u0433\u0438\u043d:<\/p>\n<pre><code class=\"kotlin\">public final class ExampleActivityKt {    @Composable    public static final void Example(@Nullable Composer $composer, final int $changed) {       \/\/ \u0442\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f restartable \u0433\u0440\u0443\u043f\u043f\u0430       $composer = $composer.startRestartGroup(-259780235);       ComposerKt.sourceInformation($composer, \"C(Example):ExampleActivity.kt#64jxz8\");       if ($changed == 0 &amp;&amp; $composer.getSkipping()) {         \/\/ \u0442\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f skippable \u0433\u0440\u0443\u043f\u043f\u0430         \/\/ \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0421ompose, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c         \/\/ \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430          $composer.skipToGroupEnd();        } else {          if (ComposerKt.isTraceInProgress()) {             ComposerKt.traceEventStart(-259780235, $changed, -1, \"com.abocha.composemetrics.Example (ExampleActivity.kt:17)\");          }           \/\/ \u0412\u043e\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u0430\u043c\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438, \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435          \/\/ \u044d\u0442\u043e \u043e\u0431\u0432\u0435\u0441\u044b \u043e\u0442 Compose \u043f\u043b\u0430\u0433\u0438\u043d\u0430          System.out.println(\"make compose great again\");                   if (ComposerKt.isTraceInProgress()) {             ComposerKt.traceEventEnd();          }       }        ScopeUpdateScope var10000 = $composer.endRestartGroup();       if (var10000 != null) {          var10000.updateScope((Function2)(new Function2() {             public final void invoke(@Nullable Composer $composer, int $force) {                ExampleActivityKt.Example($composer, RecomposeScopeImplKt.updateChangedFlags($changed | 1));             }          }));       }     } }<\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0441 \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u0434\u043e\u043c Compose compiler. \u041d\u043e \u0443\u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u0430\u0436\u0435 \u043d\u0430 \u043f\u0443\u0441\u0442\u0443\u044e Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u044e. <\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043d\u0430 \u0447\u0451\u043c \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0437\u0430\u043e\u0441\u0442\u0440\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0442\u0430\u043a \u044d\u0442\u043e \u043d\u0430 <code>$composer.skipToGroupEnd()<\/code> \u0438 <code>$composer.startRestartGroup(-259780235)<\/code>. \u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0433\u0440\u0443\u0431\u043e, \u0442\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 <code>skipToGroupEnd<\/code> \u2014 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u043b\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"https:\/\/jorgecastillo.dev\/book\/\">Jetpack Compose internals<\/a>).<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0439\u0434\u0451\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432 \u043d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<pre><code class=\"kotlin\">@Composable fun Example() {   \/\/ \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 composable \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Text     Text(\"make compose great again\") }<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (\u043f\u043e\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u044f): <\/p>\n<pre><code class=\"kotlin\">public final class ExampleActivityKt {    @Composable    @ComposableTarget(       applier = \"androidx.compose.ui.UiComposable\"    )    public static final void Example(@Nullable Composer $composer, final int $changed) {           \/\/ \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0443\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u043b\u043e\u0433          \/\/ \u0432\u044b\u0437\u0432\u044b\u0430\u0435\u0442\u0441\u044f Composable \u0444\u0443\u043a\u043d\u0446\u0438\u044f Text, \u0432\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0448\u0435 \u0438 \u043d\u0438\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439          TextKt.Text--4IGK_g(\"make compose great again\", (Modifier)null, 0L, 0L, (FontStyle)null, (FontWeight)null, (FontFamily)null, 0L, (TextDecoration)null, (TextAlign)null, 0L, 0, false, 0, 0, (Function1)null, (TextStyle)null, $composer, 6, 0, 131070); }<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0432 \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e: <\/p>\n<pre><code class=\"kotlin\">@Composable fun Example(text: String) {     Text(text) }<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"kotlin\">public final class ExampleActivityKt {    @Composable    @ComposableTarget(       applier = \"androidx.compose.ui.UiComposable\"    )    \/\/ \u041f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438    public static final void Example(@NotNull final String text, @Nullable Composer $composer, final int $changed) {     \/\/... \u0442\u0443\u0442 \u0432\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435, skippable \u0433\u0440\u0443\u043f\u043f\u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f }<\/code><\/pre>\n<p>String \u2014  \u044d\u0442\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e. \u0423 \u043d\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c skipable-\u0433\u0440\u0443\u043f\u043f\u0430. <\/p>\n<p>\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0432 \u043d\u0430\u0448\u0443 Composable \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440? <\/p>\n<pre><code class=\"kotlin\">class ExampleActivity : ComponentActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContent {             Example(listOf(\"make compose great again\"))         }     } }  @Composable \/\/ \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 fun Example(texts: List&lt;String&gt;) {     Text(texts.toString()) }<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong>. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/companies\/ozontech\/articles\/742854\/#2.2\">\u041e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f Compose<\/a> \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0438 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442: <\/p>\n<pre><code class=\"kotlin\">public final class ExampleActivityKt {    @Composable    @ComposableTarget(       applier = \"androidx.compose.ui.UiComposable\"    )    public static final void Example(@NotNull final List texts, @Nullable Composer $composer, final int $changed) {       Intrinsics.checkNotNullParameter(texts, \"texts\");       $composer = $composer.startRestartGroup(1558598647);       \/\/ \u0422\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e restart \u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f, \u0430 \u0432\u043e\u0442 skippable \u0443\u0436\u0435 \u043d\u0435\u0442 !!       ComposerKt.sourceInformation($composer, \"C(Example)19@523L22:ExampleActivity.kt#64jxz8\");       if (ComposerKt.isTraceInProgress()) {          ComposerKt.traceEventStart(1558598647, $changed, -1, \"com.abocha.composemetrics.Example (ExampleActivity.kt:18)\");       }        TextKt.Text--4IGK_g(texts.toString(), (Modifier)null, 0L, 0L, (FontStyle)null, (FontWeight)null, (FontFamily)null, 0L, (TextDecoration)null, (TextAlign)null, 0L, 0, false, 0, 0, (Function1)null, (TextStyle)null, $composer, 0, 0, 131070);       if (ComposerKt.isTraceInProgress()) {          ComposerKt.traceEventEnd();       }        ScopeUpdateScope var10000 = $composer.endRestartGroup();       if (var10000 != null) {          var10000.updateScope((Function2)(new Function2() {             public final void invoke(@Nullable Composer $composer, int $force) {                ExampleActivityKt.Example(texts, $composer, RecomposeScopeImplKt.updateChangedFlags($changed | 1));             }          }));       }    } }<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u043f\u0430\u043b\u0430 skipable-\u0433\u0440\u0443\u043f\u043f\u0430. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 Composable-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u041f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0435, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/chrisbanes.me\/posts\/composable-metrics\/\">Compose metrics<\/a>.<\/p>\n<h2>\u0410 \u043a\u0430\u043a \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 graddle-\u043f\u043b\u0430\u0433\u0438\u043d?<\/h2>\n<p>\u041d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e, \u043a\u0430\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b:<\/p>\n<pre><code class=\"kotlin\">class DecomposerPlugin:Plugin&lt;Project&gt; {     override fun apply(project: Project) {         project.tasks.withType&lt;KotlinCompile&gt;()             .whenTaskAdded {                 val kotlinCompileTask: KotlinCompile = this                 this.doLast {                     val kotlinFiles = kotlinCompileTask.destinationDirectory.asFileTree.files                         .map{it.absolutePath} \/\/ \u0442\u0443\u0442 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u043a\u043e\u0442\u043b\u0438\u043d \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430                     val output = File(project.buildDir,\"decompiled\").apply {                         deleteRecursively()                         mkdir()                     } \/\/ \u0442\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 \u0433\u0434\u0435 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b                     val options: MutableList&lt;String&gt; = kotlinFiles.toMutableList()     <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-427408","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427408","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=427408"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427408\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=427408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=427408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=427408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}