{"id":361795,"date":"2024-05-21T01:21:14","date_gmt":"2024-05-21T01:21:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=361795"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T01:21:14","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=361795","title":{"rendered":"<span>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Dynamic Proxy \u0438 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/5e5\/164\/e8d\/5e5164e8d407a4f96c08afa2285baf39.jpg\" width=\"1000\" height=\"563\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5e5\/164\/e8d\/5e5164e8d407a4f96c08afa2285baf39.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><em>Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a RuStore \u0410\u043d\u0430\u0442\u043e\u043b\u0438\u0439 \u0413\u0443\u0441\u0435\u0432 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442, \u043a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u00ab\u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0445\u00bb \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435. \u041f\u043e\u0434 \u00ab\u0445\u043e\u043b\u043e\u0434\u043d\u044b\u043c\u0438\u00bb \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c\u0438 \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u0438\u0437 \u0441\u0435\u0442\u0438<\/em>.<\/p>\n<h3>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f TBD (trunk-based development \u2014 \u043c\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430), \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0438\u0447\u0443 \u043f\u043e\u0434 \u00ab\u0445\u043e\u043b\u043e\u0434\u043d\u044b\u043c\u00bb \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c (toggle) \u043d\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0447\u0430\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 24 \u0447\u0430\u0441\u043e\u0432 \u0434\u043e 15 \u043c\u0438\u043d\u0443\u0442, \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 endpoint, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0443 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/h3>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432\u0448\u0438\u0441\u044c, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0432\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u041c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f: \u0432\u0441\u0435 \u0444\u0438\u0447\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e Gradle-\u043c\u043e\u0434\u0443\u043b\u044f\u043c. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u0436\u0434\u0430\u044f \u0444\u0438\u0447\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438 <code>api<\/code> \u0438 <code>implementation<\/code>. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0444\u0438\u0447\u0435\u0439 \u0438\u0437 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0412\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0438\u0447\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <code>implementation<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 <code>implementation<\/code>-\u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041e\u043d \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0438\u0447\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0433\u0434\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438, \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0444\u0438\u0447\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 \u044d\u0442\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"kotlin\">data class Configuration( val loggerEnabled: Boolean, val syncInterval: Long, val someFeatureEnabled: Boolean ... )<\/code><\/pre>\n<p>\u0423 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u043c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ol>\n<li>\n<p>\u0411\u0438\u0437\u043d\u0435\u0441-\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0438\u0447 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u00ab\u043f\u0440\u043e\u0442\u0435\u043a\u0430\u0435\u0442\u00bb \u0432 \u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043b\u043a\u0438\u0445, \u043d\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0441\u043b\u0438\u044f\u043d\u0438\u044f (merge conflict). \u042d\u0442\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0438 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0444\u0438\u0447\u0438 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u043f\u0440\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u044d\u0442\u043e\u0439 \u0444\u0438\u0447\u0435\u0439 \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043e\u0442 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u0432\u044b\u0434\u0435\u043b\u0438\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0444\u0438\u0447\u0438 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u044f \u0435\u0433\u043e \u0432 API-\u043c\u043e\u0434\u0443\u043b\u044c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/32f\/b6b\/d40\/32fb6bd4082df27861f96a13d608c814.jpg\" width=\"3840\" height=\"2160\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/32f\/b6b\/d40\/32fb6bd4082df27861f96a13d608c814.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041d\u043e \u0432\u0437\u0430\u043c\u0435\u043d \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 1.<\/strong> \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043d\u0444\u0438\u0433 \u0437\u0430\u0434\u0430\u043d \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u0443 \u043d\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. \u041a\u043e\u043d\u0444\u0438\u0433\u0438 \u0434\u043b\u044f \u0440\u0435\u043b\u0438\u0437\u0430 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u044b \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0438 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 2.<\/strong> \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u0434\u0438\u043b\u0435\u043c\u043c\u0430 \u0441 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u0440\u0435\u043b\u0438\u0437\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e, \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044f <code>implementation<\/code>, \u0447\u0442\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442 \u0441\u0431\u043e\u0440\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 Gradle-\u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0435. \u042d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 (boilerplate) \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Dynamic Proxy<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0443\u0436\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Java Dynamic Proxy. \u042d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430). \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u043b\u0438\u0437\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb, \u0442\u043e \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430? \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u043f\u043e\u043b\u044f\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0430.<\/p>\n<pre><code class=\"kotlin\">interface GreetingConfig : ConfigMarker { @get:ConfigStringValue(\"World\") val target: String }<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438 \u0431\u0435\u0437 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u0442\u0430\u043a \u043a\u0430\u043a Kotlin \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0435\u043b\u0438\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435.<\/p>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b Dynamic Proxy \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432. \u041c\u044b \u043e\u0442\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443 \u0442\u0438\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0433\u043e. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u0442\u0438\u043f\u044b, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043c\u0430\u0440\u043a\u0435\u0440\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c <code>ConfigMarker<\/code>.<\/p>\n<pre><code class=\"kotlin\">interface Configs { operator fun &lt;T : ConfigMarker> get(configType: Class&lt;T>): T }<\/code><\/pre>\n<pre><code class=\"kotlin\">class ConfigsImpl @Inject constructor(): Configs {  override operator fun &lt;T : ConfigMarker> get(configType: Class&lt;T>): T { val types = arrayOf(configType) val invocationHandler = ConfigProxyInvocationHandler() return Proxy.newProxyInstance(javaClass.classLoader, types, invocationHandler) as T } }<\/code><\/pre>\n<pre><code class=\"kotlin\">internal class ConfigProxyInvocationHandler: InvocationHandler{  override fun invoke(instance: Any, method: Method, args: Array&lt;out Any>?): Any { var valueFromAnnotation:Any? = null when { method.isAnnotationPresent(ConfigStringValue::class.java) ->{ valueFromAnnotation = method.getAnnotation(ConfigStringValue::class.java)?.releaseValue } ... } return valueFromAnnotation ?: error(\"All config properties must be annotated\") } }<\/code><\/pre>\n<p><code>InvocationHandler<\/code> \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u043f\u043e\u043b\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438. \u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0433\u0435\u0442\u0442\u0435\u0440\u0430\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0441 \u0440\u0435\u043b\u0438\u0437\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0438, \u0432\u044b\u0442\u0430\u0449\u0438\u0432 \u0438\u0437 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e. \u0415\u0441\u043b\u0438 \u0431\u044b\u043b\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043d\u0435 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443, \u0442\u043e \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.  <\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430. \u0414\u043b\u044f \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441: \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c Gradle-\u043c\u043e\u0434\u0443\u043b\u0435, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u2014 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043b\u043e\u0434\u0438\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u043c\u043e\u0434\u0443\u043b\u044c, \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432.<\/p>\n<p>\u041e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e <code>data<\/code>-\u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<pre><code class=\"kotlin\">data class GreetingDebugConfig( override val target: String = \"Test\", ) : GreetingCon<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c \u0432 <code>Map<\/code>. \u041a\u043b\u044e\u0447\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<pre><code class=\"kotlin\">class ConfigInMemoryDataSource @Inject constructor() {  private val configs: MutableMap&lt;Class&lt;out ConfigMarker>, ConfigMarker> = mutableMapOf()  fun &lt;T : ConfigMarker> get(configType: Class&lt;T>): T = configs[configType] as? T ?: error(\"No debug config\") ... }<\/code><\/pre>\n<p>\u041d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041b\u044e\u0431\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u043e\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0451 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0444\u0438\u0447\u0430\u043c\u0438. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c <code>State<\/code> \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<pre><code class=\"kotlin\">data class ConfigState( val configValues: Map&lt;String, ConfigProperty>, val expanded: Boolean = false, )  open class ConfigProperty( val displayName: String, val fullName: String, )<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 <code>ConfigProperty<\/code>. <\/p>\n<pre><code class=\"kotlin\">class ConfigBoolProperty(displayName: String, fullName: String, val value: Boolean) :ConfigProperty(displayName, fullName)  class ConfigIntProperty(displayName: String, fullName: String, val value: Int) :ConfigProperty(displayName, fullName)  class ConfigLongProperty(displayName: String, fullName: String, val value: Long) : ConfigProperty(displayName, fullName)  class ConfigStringProperty(displayName: String, fullName: String, val value: String) : ConfigProperty(displayName, fullName)<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043b\u0435\u0437\u0442\u044c \u0435\u0449\u0451 \u0438 \u0432 UI \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c <code>State<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u0432 <code>State<\/code>.<\/p>\n<pre><code class=\"kotlin\">class ConfigStateMapper @Inject constructor() {  fun map(configType: Class&lt;out ConfigMarker>, config: ConfigMarker): ConfigState { val properties = config.javaClass.kotlin.memberProperties val propertiesData = properties.associate { property -> val propertyValue = property.getter.call(config) val fullName = \"${configType.name}.${property.name}\" fullName to toPropertyModel(fullName, property, propertyValue) } return ConfigState(propertiesData) }  private fun &lt;T, V> toPropertyModel(fullName: String, property: KProperty1&lt;T, V>, propertyValue: Any?): ConfigProperty = when { isPropertyAssignableFrom(property, Boolean::class.java) -> ConfigBoolProperty(property.name, fullName, propertyValue as Boolean) isPropertyAssignableFrom(property, Int::class.java) -> ConfigIntProperty(property.name, fullName, propertyValue as Int) isPropertyAssignableFrom(property, Long::class.java) -> ConfigLongProperty(property.name, fullName, propertyValue as Long) else -> ConfigStringProperty(property.name, fullName, propertyValue.toString()) }  private fun &lt;T, V> isPropertyAssignableFrom(property: KProperty1&lt;T, V>, type: Class&lt;*>, ): Boolean = property.javaField?.type?.isAssignableFrom(type) ?: false }<\/code><\/pre>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u043a\u0440\u0430\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 <code>State<\/code>. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u043f\u0430\u0440 \u00ab\u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00bb. \u041a\u043b\u044e\u0447\u043e\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0438 \u0438\u043c\u044f \u043f\u043e\u043b\u044f, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043f\u0430\u0440\u044b \u0432 <code>preferences<\/code>. \u0412 \u044d\u0442\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439, \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u0432\u0435\u0440\u0438\u043c \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c <code>State<\/code> \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/9eb\/d86\/ce1\/9ebd86ce1fd57dc3a4de8a0bf9432ca7.jpg\" width=\"3840\" height=\"2188\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9eb\/d86\/ce1\/9ebd86ce1fd57dc3a4de8a0bf9432ca7.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u043d\u0435\u043c\u0443 \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<pre><code class=\"kotlin\">private fun applyToConfig(configKey: Class&lt;out ConfigMarker>, config: ConfigMarker, changed: Map&lt;String, String>) { val properties = config.javaClass.kotlin.memberProperties properties.forEach { property -> val fullName = \"${configKey.name}.${property.name}\"  if (changed.contains(fullName)) { property.javaField?.isAccessible = true  when { isPropertiesAssignableFrom(property, Boolean::class.java) -> { property.javaField?.set(config, changed[fullName]?.toBoolean()) } ... } } } }<\/code><\/pre>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043e \u0442\u043e\u043c, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0438, \u0430 \u0433\u0434\u0435 \u043d\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 androidx.startup \u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043d\u0430 \u044d\u0442\u0430\u043f \u0434\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"kotlin\">internal class ConfigInitializer : Initializer&lt;Unit> {  @Inject internal lateinit var initConfigsUseCase: InitConfigsUseCase  override fun create(context: Context) { \/\/inject dependency initConfigsUseCase() } }<\/code><\/pre>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0435\u0449\u0451 \u043d\u0435\u0442, \u0441\u0434\u0435\u043b\u0430\u0435\u043c <code>ConfigInMemoryDataSource<\/code> \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c\u0438 \u0443\u0436\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c7b\/898\/4e0\/c7b8984e04f2b86de3e5129e313daf96.png\" width=\"3840\" height=\"2188\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c7b\/898\/4e0\/c7b8984e04f2b86de3e5129e313daf96.png\"\/><\/figure>\n<p>\u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u0448\u0430\u0433\u0438 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0438\u0431\u043a\u043e\u0439 \u0438 \u0431\u043e\u0433\u0430\u0442\u043e\u0439 \u043d\u0430 \u0444\u0438\u0447\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u00ab\u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0445\u00bb \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430 \u2014 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/gitflic.ru\/project\/anatoliigusev\/config-example\">\u0442\u0443\u0442<\/a>.  <\/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\/777874\/\"> https:\/\/habr.com\/ru\/articles\/777874\/<\/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<figure class=\"full-width\"><\/figure>\n<p><em>Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a RuStore \u0410\u043d\u0430\u0442\u043e\u043b\u0438\u0439 \u0413\u0443\u0441\u0435\u0432 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442, \u043a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u00ab\u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0445\u00bb \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435. \u041f\u043e\u0434 \u00ab\u0445\u043e\u043b\u043e\u0434\u043d\u044b\u043c\u0438\u00bb \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c\u0438 \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u0438\u0437 \u0441\u0435\u0442\u0438<\/em>.<\/p>\n<h3>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f TBD (trunk-based development \u2014 \u043c\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430), \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0438\u0447\u0443 \u043f\u043e\u0434 \u00ab\u0445\u043e\u043b\u043e\u0434\u043d\u044b\u043c\u00bb \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c (toggle) \u043d\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0447\u0430\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 24 \u0447\u0430\u0441\u043e\u0432 \u0434\u043e 15 \u043c\u0438\u043d\u0443\u0442, \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 endpoint, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0443 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/h3>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432\u0448\u0438\u0441\u044c, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0432\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u041c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f: \u0432\u0441\u0435 \u0444\u0438\u0447\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e Gradle-\u043c\u043e\u0434\u0443\u043b\u044f\u043c. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u0436\u0434\u0430\u044f \u0444\u0438\u0447\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438 <code>api<\/code> \u0438 <code>implementation<\/code>. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0444\u0438\u0447\u0435\u0439 \u0438\u0437 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0412\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0438\u0447\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <code>implementation<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 <code>implementation<\/code>-\u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041e\u043d \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0438\u0447\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0433\u0434\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438, \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0444\u0438\u0447\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 \u044d\u0442\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"kotlin\">data class Configuration( val loggerEnabled: Boolean, val syncInterval: Long, val someFeatureEnabled: Boolean ... )<\/code><\/pre>\n<p>\u0423 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u043c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ol>\n<li>\n<p>\u0411\u0438\u0437\u043d\u0435\u0441-\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0438\u0447 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u00ab\u043f\u0440\u043e\u0442\u0435\u043a\u0430\u0435\u0442\u00bb \u0432 \u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043b\u043a\u0438\u0445, \u043d\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0441\u043b\u0438\u044f\u043d\u0438\u044f (merge conflict). \u042d\u0442\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0438 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0444\u0438\u0447\u0438 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u043f\u0440\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u044d\u0442\u043e\u0439 \u0444\u0438\u0447\u0435\u0439 \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043e\u0442 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u0432\u044b\u0434\u0435\u043b\u0438\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0444\u0438\u0447\u0438 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u044f \u0435\u0433\u043e \u0432 API-\u043c\u043e\u0434\u0443\u043b\u044c.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u043e \u0432\u0437\u0430\u043c\u0435\u043d \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 1.<\/strong> \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043d\u0444\u0438\u0433 \u0437\u0430\u0434\u0430\u043d \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u0443 \u043d\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. \u041a\u043e\u043d\u0444\u0438\u0433\u0438 \u0434\u043b\u044f \u0440\u0435\u043b\u0438\u0437\u0430 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u044b \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0438 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 2.<\/strong> \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u0434\u0438\u043b\u0435\u043c\u043c\u0430 \u0441 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u0440\u0435\u043b\u0438\u0437\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e, \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044f <code>implementation<\/code>, \u0447\u0442\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442 \u0441\u0431\u043e\u0440\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 Gradle-\u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0435. \u042d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 (boilerplate) \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Dynamic Proxy<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0443\u0436\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Java Dynamic Proxy. \u042d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430). \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u043b\u0438\u0437\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb, \u0442\u043e \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430? \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u043f\u043e\u043b\u044f\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0430.<\/p>\n<pre><code class=\"kotlin\">interface GreetingConfig : ConfigMarker { @get:ConfigStringValue(\"World\") val target: String }<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438 \u0431\u0435\u0437 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u0442\u0430\u043a \u043a\u0430\u043a Kotlin \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0435\u043b\u0438\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435.<\/p>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b Dynamic Proxy \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432. \u041c\u044b \u043e\u0442\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443 \u0442\u0438\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0433\u043e. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u0442\u0438\u043f\u044b, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043c\u0430\u0440\u043a\u0435\u0440\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c <code>ConfigMarker<\/code>.<\/p>\n<pre><code class=\"kotlin\">interface Configs { operator fun &lt;T : ConfigMarker> get(configType: Class&lt;T>): T }<\/code><\/pre>\n<pre><code class=\"kotlin\">class ConfigsImpl @Inject constructor(): Configs {  override operator fun &lt;T : ConfigMarker> get(configType: Class&lt;T>): T { val types = arrayOf(configType) val invocationHandler = ConfigProxyInvocationHandler() return Proxy.newProxyInstance(javaClass.classLoader, types, invocationHandler) as T } }<\/code><\/pre>\n<pre><code class=\"kotlin\">internal class ConfigProxyInvocationHandler: InvocationHandler{  override fun invoke(instance: Any, method: Method, args: Array&lt;out Any>?): Any { var valueFromAnnotation:Any? = null when { method.isAnnotationPresent(ConfigStringValue::class.java) ->{ valueFromAnnotation = method.getAnnotation(ConfigStringValue::class.java)?.releaseValue } ... } return valueFromAnnotation ?: error(\"All config properties must be annotated\") } }<\/code><\/pre>\n<p><code>InvocationHandler<\/code> \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u043f\u043e\u043b\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438. \u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0433\u0435\u0442\u0442\u0435\u0440\u0430\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0441 \u0440\u0435\u043b\u0438\u0437\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0438, \u0432\u044b\u0442\u0430\u0449\u0438\u0432 \u0438\u0437 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e. \u0415\u0441\u043b\u0438 \u0431\u044b\u043b\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043d\u0435 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443, \u0442\u043e \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.  <\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430. \u0414\u043b\u044f \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441: \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c Gradle-\u043c\u043e\u0434\u0443\u043b\u0435, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u2014 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043b\u043e\u0434\u0438\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u043c\u043e\u0434\u0443\u043b\u044c, \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432.<\/p>\n<p>\u041e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e <code>data<\/code>-\u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<pre><code class=\"kotlin\">data class GreetingDebugConfig( override val target: String = \"Test\", ) : GreetingCon<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c \u0432 <code>Map<\/code>. \u041a\u043b\u044e\u0447\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<pre><code class=\"kotlin\">class ConfigInMemoryDataSource @Inject constructor() {  private val configs: MutableMap&lt;Class&lt;out ConfigMarker>, ConfigMarker> = mutableMapOf()  fun &lt;T : ConfigMarker> get(configType: Class&lt;T>): T = configs[configType] as? T ?: error(\"No debug config\") ... }<\/code><\/pre>\n<p>\u041d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041b\u044e\u0431\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u043e\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0451 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0444\u0438\u0447\u0430\u043c\u0438. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c <code>State<\/code> \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<pre><code class=\"kotlin\">data class ConfigState( val configValues: Map&lt;String, ConfigProperty>, val expanded: Boolean = false, )  open class ConfigProperty( val displayName: String, val fullName: String, )<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 <code>ConfigProperty<\/code>. <\/p>\n<pre><code class=\"kotlin\">class ConfigBoolProperty(displayName: String, fullName: String, val value: Boolean) :ConfigProperty(displayName, fullName)  class ConfigIntProperty(displayName: String, fullName: String, val value: Int) :ConfigProperty(displayName, fullName)  class ConfigLongProperty(displayName: String, fullName: String, val value: Long) : ConfigProperty(displayName, fullName)  class ConfigStringProperty(displayName: String, fullName: String, val value: String) : ConfigProperty(displayName, fullName)<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043b\u0435\u0437\u0442\u044c \u0435\u0449\u0451 \u0438 \u0432 UI \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c <code>State<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u0432 <code>State<\/code>.<\/p>\n<pre><code class=\"kotlin\">class ConfigStateMapper @Inject constructor() {  fun map(configType: Class&lt;out ConfigMarker>, config: ConfigMarker): ConfigState { val properties = config.javaClass.kotlin.memberProperties val propertiesData = properties.associate { property -> val propertyValue = property.getter.call(config) val fullName = \"${configType.name}.${property.name}\" fullName to toPropertyModel(fullName, property, propertyValue) } return ConfigState(propertiesData) }  private fun &lt;T, V> toPropertyModel(fullName: String, property: KProperty1&lt;T, V>, propertyValue: Any?): ConfigProperty = when { isPropertyAssignableFrom(property, Boolean::class.java) -> ConfigBoolProperty(property.name, fullName, propertyValue as Boolean) isPropertyAssignableFrom(property, Int::class.java) -> ConfigIntProperty(property.name, fullName, propertyValue as Int) isPropertyAssignableFrom(property, Long::class.java) -> ConfigLongProperty(property.name, fullName, propertyValue as Long) else -> ConfigStringProperty(property.name, fullName, propertyValue.toString()) }  private fun &lt;T, V> isPropertyAssignableFrom(property: KProperty1&lt;T, V>, type: Class&lt;*>, ): Boolean = property.javaField?.type?.isAssignableFrom(type) ?: false }<\/code><\/pre>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u043a\u0440\u0430\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 <code>State<\/code>. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u043f\u0430\u0440 \u00ab\u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00bb. \u041a\u043b\u044e\u0447\u043e\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u0438 \u0438\u043c\u044f \u043f\u043e\u043b\u044f, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043f\u0430\u0440\u044b \u0432 <code>preferences<\/code>. \u0412 \u044d\u0442\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439, \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u0432\u0435\u0440\u0438\u043c \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c <code>State<\/code> \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u043d\u0435\u043c\u0443 \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<pre><code class=\"kotlin\">private fun applyToConfig(configKey: Class&lt;out ConfigMarker>, config: ConfigMarker, changed: Map&lt;String, String>) { val properties = config.javaClass.kotlin.memberProperties properties.forEach { property -> val fullName = \"${configKey.name}.${property.name}\"  if (changed.contains(fullName)) { property.javaField?.isAccessible = true  when {<\/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-361795","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361795","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=361795"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361795\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=361795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=361795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=361795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}