{"id":332743,"date":"2022-05-04T15:00:37","date_gmt":"2022-05-04T15:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=332743"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=332743","title":{"rendered":"<span>\u041a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 QIWI \u041a\u043e\u0448\u0435\u043b\u0435\u043a<\/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>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!\u00a0<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0412\u0430\u0441\u0438\u043b\u0438\u0439 \u041c\u0430\u0442\u0435\u0440\u0438\u043a\u0438\u043d, \u044f \u2014 Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 QIWI. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432 \u0432 QIWI \u041a\u043e\u0448\u0435\u043b\u044c\u043a\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/564\/ced\/aaf\/564cedaafbc9fcdd823f2287e51ba26b.jpeg\" width=\"1600\" height=\"902\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/564\/ced\/aaf\/564cedaafbc9fcdd823f2287e51ba26b.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 Trunk-Based Development \u0438 Feature Flags<\/h2>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043d\u043e\u0433\u043e \u0444\u0438\u0447 \u0438 \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0442\u0440\u0443\u0434\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043a\u0430\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432. \u041c\u044b \u0432 QIWI \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u044d\u0442\u0438\u043c \u0434\u0432\u0430 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434, \u043a\u043e\u0433\u0434\u0430 \u0432 QIWI \u041a\u043e\u0448\u0435\u043b\u044c\u043a\u0435 \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e feature-\u043a\u043e\u043c\u0430\u043d\u0434. \u0412\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 feature-\u0432\u0435\u0442\u043e\u043a \u043d\u0435 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e feature-\u043a\u043e\u043c\u0430\u043d\u0434, \u0432\u0435\u0442\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u044a\u0451\u043c\u043d\u044b\u043c\u0438. \u041f\u043e\u0442\u043e\u043c \u0441\u043c\u0435\u0440\u0436\u0438\u0442\u044c \u0438\u0445 \u0432 \u043c\u0430\u0441\u0442\u0435\u0440 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b.\u00a0<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/trunkbaseddevelopment.com\"><u>Trunk-Based Development<\/u><\/a> (TBD). TBD \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0435\u0442\u043a\u0430\u0445 \u0438, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0431\u044b\u043b\u0438 \u0432\u043b\u0438\u0442\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0438 \u0440\u0435\u0432\u044c\u044e \u0438 \u0431\u044b\u043b\u0438 \u0432\u043b\u0438\u0442\u044b \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443. \u042d\u0442\u043e, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u2014 \u043a\u043e\u0433\u0434\u0430 \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0435\u043b\u0438\u0437\u0443, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0440\u0435\u043b\u0438\u0437\u0438\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041c\u044b \u0436\u0435 \u0440\u0435\u043b\u0438\u0437\u044b \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0430\u0441\u0442\u043e. \u0418 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e TBD \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438, \u043a\u0430\u043a Branch by Abstraction (BBA) \u0438 Feature Flags (FF).<\/p>\n<p>BBA \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u0442\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c. \u0421\u0440\u0430\u0437\u0443 \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f (\u0443\u0436\u0435 \u0441 \u043d\u043e\u0432\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c) \u0438 \u0441 \u043d\u0435\u0439 \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0438\u0447\u0435\u0439 \u2014 \u044d\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0443\u0436\u0435 \u043d\u0430\u0434 \u043d\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0435\u0449\u0451 \u0441\u0442\u0430\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u0444\u0438\u0447\u0435\u0439.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 BBA, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 QIWI-\u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8e4\/ec5\/109\/8e4ec51099d2ee6dc2b215e7458e1f8d.png\" width=\"1028\" height=\"1120\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e4\/ec5\/109\/8e4ec51099d2ee6dc2b215e7458e1f8d.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0440\u044b\u043c \u0438 \u043d\u043e\u0432\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c, \u043e\u043d\u0438 \u0435\u0449\u0435 \u0434\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>A\/B-\u0442\u0435\u0441\u0442\u044b. \u0415\u0441\u0442\u044c \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0438\u0447\u0438, \u0435\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0444\u0438\u0447\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0430\u0441\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u043b\u0438\u0437\u0438\u0442\u044c \u0445\u043e\u0442\u0444\u0438\u043a\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u0435.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0444\u0438\u0447\u0430-\u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u043f\u0440\u043e\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0444\u0438\u0447\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Feature Flags<\/h2>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Feature Flags \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 opensource-\u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043b\u044f Gradle, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u043b\u0430\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043b\u0430\u0441\u0441 BuildConfig \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442. \u041f\u043e\u0442\u043e\u043c \u0432 \u043a\u043e\u0434\u0435 \u043c\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u043e\u0436\u0435\u043c \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u0438 \u0444\u043b\u0430\u0433\u0438 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0444\u0438\u0447\u0438 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0441\u043e\u0432:\u00a0<\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u043b\u044c\u0437\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433. ,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0444\u043b\u0430\u0433\u0430, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c <a href=\"https:\/\/github.com\/qiwi\/FeatureToggle\"><u>\u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438. \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a RxJava 2. \u041c\u044b \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0438 \u0435\u0451 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Kotlin Coroutines \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p><strong>compiler<\/strong> \u2014 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>feature-manager<\/strong> \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p><strong>converter-gson, converter-jackson<\/strong> \u2014 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432 \u0438\u0437 json;<\/p>\n<\/li>\n<li>\n<p><strong>datasource-firebase, datasource-agconnect<\/strong> \u2014 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Firebase Remote Config \u0438 Huawei Remote Config.<\/p>\n<\/li>\n<li>\n<p><strong>datasource-remote<\/strong> \u2014 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0444\u043b\u0430\u0433\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e http \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>datasource-debug<\/strong> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e adb (\u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433 \u0441\u0431\u043e\u0440\u043e\u043a).<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0421\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 FeatureManager, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0448\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432, \u0438 \u0443 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0444\u0438\u0447\u0443. \u0423 FeatureManager \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0444\u0438\u0447\u0443, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u0435 \u0442\u0438\u043f, \u043b\u0438\u0431\u043e \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0443. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u043a \u0444\u0430\u0431\u0440\u0438\u043a\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0438\u0447\u0438.\u00a0<\/p>\n<pre><code class=\"kotlin\">interface FeatureManager {          fun &lt;Flag> getFeatureFlag(flagClass: Class&lt;Flag>): Flag?      fun &lt;Feature> getFeature(featureClass: Class&lt;Feature>): Feature      fun &lt;Feature, Flag> getFeature(featureClass: Class&lt;Feature>, factory: FeatureFactory&lt;Feature, Flag>): Feature  }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f data-\u043a\u043b\u0430\u0441\u0441\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0439, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0443.\u00a0<\/p>\n<pre><code class=\"kotlin\">@FeatureFlag(\"search_config\") data class SearchConfigFlag(     @JsonProperty(\"newSearch\")     val newSearch: Boolean,     @JsonProperty(\"remoteSearch\")     val remoteSearch: Boolean)<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0438\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f FeatureFactory \u2014 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434 <strong>createFeature<\/strong>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0438\u0447\u0438.\u00a0<\/p>\n<pre><code class=\"kotlin\">@Factory class SearchConfigFactory: FeatureFactory&lt;SearchConfig, SearchConfigFlag>() {      override fun createFeature(flag: SearchConfigFlag): SearchConfig = if(flag.newSearch) {         NewSearchConfig(flag.remoteSearch)     }     else {         createDefault()     }      override fun createDefault(): SearchConfig = OldSearchConfig()  }<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0437\u043d\u0430\u043b\u0430, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0438 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043d\u0438\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <strong>@FeatureFlag<\/strong> \u0438 <strong>@Factory<\/strong>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Annotation-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0440\u0435\u0435\u0441\u0442\u0440\u044b \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0438 \u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0430\u043c\u0438.<\/p>\n<pre><code class=\"kotlin\">@Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) annotation class FeatureFlag (     val key: String )<\/code><\/pre>\n<pre><code class=\"kotlin\">@Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) annotation class Factory<\/code><\/pre>\n<p>\u041d\u0430\u043c \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0434\u043e\u0448\u0435\u043b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0444\u0438\u0447\u0438 \u0438\u0437 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447\u0435\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f (\u0440\u0435\u0435\u0441\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u0447\u0435\u0439 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u043b\u0430\u0433\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438).<\/p>\n<h3>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/h3>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c. \u0422\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 FeatureManager. \u0412\u043d\u0443\u0442\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 FeatureManager \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 FeatureCreator, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0444\u0438\u0447\u0438. \u0427\u0442\u043e\u0431\u044b FeatureCreator \u0437\u043d\u0430\u043b, \u043a\u0430\u043a\u0438\u0435 \u0443 \u043d\u0435\u0433\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0441\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u0438 \u0444\u0430\u0431\u0440\u0438\u043a\u0438, \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b-\u0440\u0435\u0435\u0441\u0442\u0440\u044b \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u043e\u0432 (FeatureFlagRegistry) \u0438 \u0444\u0430\u0431\u0440\u0438\u043a (FeatureFactoryRegistry). \u042d\u0442\u043e \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439.\u00a0<\/p>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 FeatureRepository \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 FeatureFlagDataSource.\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u044b \u043a\u043b\u0430\u0434\u0435\u043c \u0432 JSON-\u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043f\u043a\u0435 assets. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c, \u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Firebase Remote Config, \u0435\u0441\u043b\u0438 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Google Play, \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Huawei Remote Config, \u0435\u0441\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u043b\u044f AppGallery.<\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u043b\u0430\u0433\u0438 \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 QIWI. \u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u0438\u0437 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u044d\u0448. \u041e\u0442\u0442\u0443\u0434\u0430 \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0445 \u0432\u0437\u044f\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441 \u0441\u0435\u0442\u044c\u044e \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438 \u0438\u0437 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u043b\u0430\u0433\u0438.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fef\/f38\/9e0\/feff389e0b8a226de6e22b59c3f7ecb0.png\" width=\"1470\" height=\"866\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fef\/f38\/9e0\/feff389e0b8a226de6e22b59c3f7ecb0.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>FeatureCreator\u00a0<\/h3>\n<p>FeatureCreator \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0444\u0438\u0447\u0438. \u0423 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0438\u0447\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0442\u0438\u043f, \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432 FeatureCreator \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432.\u00a0<\/p>\n<pre><code class=\"kotlin\">interface FeatureCreator {      fun &lt;Feature> createFeature(featureClass: Class&lt;Feature>): Feature      fun &lt;Feature, Flag> createFeature(featureClass: Class&lt;Feature>, factory: FeatureFactory&lt;Feature, Flag>): Feature } <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0438\u0447\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u043d\u0435\u0435. \u041f\u043e\u0442\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0438 \u0444\u043b\u0430\u0433\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0438\u0447\u0438. \u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0435\u0441\u0442\u0440\u044b \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u043e\u0432 \u0438 \u0444\u0430\u0431\u0440\u0438\u043a. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0438\u0447\u0443 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430 \u0432\u0434\u0440\u0443\u0433 \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c.\u00a0<\/p>\n<pre><code class=\"kotlin\">class RealFeatureCreator(     private val flagRegistry: FeatureFlagRegistry,     private val factoryRegistry: FeatureFactoryRegistry,     private val storage: ActualFlagsStorage,     private val logger: Logger ) : FeatureCreator {      @Suppress(\"UNCHECKED_CAST\")     override fun &lt;Feature> createFeature(featureClass: Class&lt;Feature>): Feature {         \/\/Find Pair of key and factory class in registry using provided feature class.         val factoryWithKey = factoryRegistry.getFactoryMap()[featureClass]             ?: throw getFeatureCreatorException(featureClass.simpleName)          \/\/Obtain feature key.         val featureKey = factoryWithKey.first          \/\/ Create instance of factory class using its first constructor.         val factory = factoryWithKey.second.constructors.first().newInstance() as FeatureFactory&lt;Feature, Any>         return createFeature(featureKey, factory)     }      @Suppress(\"UNCHECKED_CAST\")     override fun &lt;Feature, Flag> createFeature(featureClass: Class&lt;Feature>, factory: FeatureFactory&lt;Feature, Flag>): Feature {         \/\/Because factory is already provided, we can use its generic type parameter to get feature flag class.         val featureFlagClass = (factory::class.java.genericSuperclass as ParameterizedType).actualTypeArguments[1] as Class&lt;Feature>          \/\/Obtain feature key using reversed map in flag registry.         val featureKey = flagRegistry.getFeatureKeysMap()[featureFlagClass] ?: throw getFeatureCreatorException(featureClass.simpleName)          return createFeature(featureKey, factory)     }      @Suppress(\"UNCHECKED_CAST\")     private fun &lt;Feature, Flag> createFeature(featureKey: String, factory: FeatureFactory&lt;Feature, Flag>): Feature {         \/\/First we need to find actual feature flag object using key and cast it to Flag         val featureFlag = storage.getFlag(featureKey) as Flag          return if(featureFlag != null) {             factory.createFeature(featureFlag)         } else {             \/\/If feature flag is null we can ask to create feature using its default implementation.             factory.createDefault().also {                 logDefaultFlagWarning(featureKey)             }         }     }<\/code><\/pre>\n<h3>FeatureRepository<\/h3>\n<p>\u0412 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 FeatureRepository \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0441\u043b\u0438\u044f\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u043e\u0432 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430. \u0415\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u043e\u0432 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u044d\u0448, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c.\u00a0<\/p>\n<pre><code class=\"kotlin\">internal class RealFeatureRepository(     private val dataSources: List&lt;FeatureFlagDataSource>,     private val cachedFlagsStorage: CachedFlagsStorage,     private val flagRegistry: FeatureFlagRegistry,     private val converter: FeatureFlagConverter,     private val logger: Logger ): FeatureRepository {      override fun getFlags(): Flow&lt;FeatureFlagsContainer> {         val allSources = dataSources.map { dataSource ->             dataSource.getFlags(flagRegistry, converter, logger)                 .map&lt;Map&lt;String, Any>, PrioritizedFlags?> { flags ->                     PrioritizedFlags(                         flags,                         dataSource.sourceType,                         dataSource.priority,                         dataSource.key                     )                 }.onStart {                     emit(null)                 }.catch {                     emit(                         PrioritizedFlags(                             emptyMap(),                             dataSource.sourceType,                             dataSource.priority,                             dataSource.key                         )                     )                 }         }         return combine(allSources) { prioritizedFlags ->             val presentFlags = prioritizedFlags                 .filterNotNull()             val actualFlags = presentFlags                 .sortedBy { pFlags -> pFlags.priority }                 .flatMap { pFlags -> pFlags.flags.map { it.key to it.value } }                 .toMap()             val sources = presentFlags.map { it.source }.toSet()             val keys = presentFlags.map { it.key }.toSet()             FeatureFlagsContainer(actualFlags, sources, keys)         }     }      override fun getDataSourceKeys(): Set&lt;String> = dataSources.map { it.key }.toSet()      override suspend fun saveFlags(flags: Map&lt;String, Any>) {         cachedFlagsStorage.saveFlags(flags, converter, logger)   }<\/code><\/pre>\n<h3>FeatureFlagDataSource<\/h3>\n<p>FeatureFlagDataSource \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0412 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u0444\u043b\u0430\u0433\u043e\u0432 \u0438\u0437 \u043d\u0435\u0433\u043e \u0438 \u0442\u0438\u043f\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439, \u043a\u044d\u0448.\u00a0<\/p>\n<pre><code class=\"kotlin\">interface FeatureFlagDataSource {      \/**      * Loads feature flags from this DataSource.      * DataSource can load and update feature flags config any time by emitting value into result [Flow].      *      * @return A [Flow] of [Map] where key is feature key and value is object that represents feature flag.      *      * @param registry A [FeatureFlagRegistry] that can be used to map feature flag key to feature flag class.      * @param converter A [FeatureFlagConverter] that can be used to convert feature flag from Json string into object.      * @param logger A [Logger] that can be used to log any events that will occur while loading feature flags.      *\/     fun getFlags(         registry: FeatureFlagRegistry,         converter: FeatureFlagConverter,         logger: Logger     ): Flow&lt;Map&lt;String, Any>>      \/**      * Unique key for this [FeatureFlagDataSource].      *\/     val key: String      \/**      * Type of this [FeatureFlagDataSource].      * @see [FeatureFlagsSourceType].      *\/     val sourceType: FeatureFlagsSourceType      \/**      * Priority for feature flags from this [FeatureFlagDataSource].      *      * If multiple [FeatureFlagDataSource] return flag with same key,      * flag from [FeatureFlagDataSource] with biggest priority will be used.      *\/     val priority: Int }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430 \u0438\u0437 json \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 FeatureFlagConverter. \u0414\u043b\u044f \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430. \u0423 \u043d\u0430\u0441 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Jackson, \u043d\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Gson.\u00a0<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c json, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0435\u0441\u0442\u0440 FeatureFlagRegistry, \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043f\u0430\u0440\u0441\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 json. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c, \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"kotlin\">fun FeatureFlagConverter.convertFeatureFlag(     flagKey: String,     flagValue: Any,     sourceKey: String,     registry: FeatureFlagRegistry,     logger: Logger ): Pair&lt;String, Any>? {     val flagClass = registry.getFeatureFlagsMap()[flagKey]     return if (flagClass != null) {         try {             Pair(flagKey, convert(flagValue, flagClass))         } catch (e: Throwable) {             logger.logConverterException(sourceKey, flagKey, e)             null         }     } else {         null     } }<\/code><\/pre>\n<h3>FeatureFlagRegistry \u0438 FeatureFactoryRegistry<\/h3>\n<p>FeatureFlagRegistry \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043f\u0443, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043c\u044f \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 \u043a\u043b\u0430\u0441\u0441 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430. \u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0432\u0435\u0440\u0441\u0438\u0432\u043d\u043e\u0439 \u043c\u0430\u043f\u044b.<\/p>\n<pre><code class=\"kotlin\">interface FeatureFlagRegistry {      \/**      * Returns map where key is feature key and value is feature flag class.      *\/     fun getFeatureFlagsMap(): Map&lt;String, Class&lt;*>>      \/**      * Returns map where key is feature flag class and value is feature key.      *\/     fun getFeatureKeysMap(): Map&lt;Class&lt;*>, String> }<\/code><\/pre>\n<p>FeatureFactoryRegistry \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043f\u0443, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 \u2014 \u043a\u043b\u0430\u0441\u0441 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u043a\u043b\u0430\u0441\u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0438\u0447\u0438.<\/p>\n<pre><code class=\"kotlin\">interface FeatureFactoryRegistry {      \/**      * Returns map where key is feature class and value is [Pair] of feature key and factory class.      *\/     fun getFactoryMap(): Map&lt;Class&lt;*>, Pair&lt;String, Class&lt;*>>> }<\/code><\/pre>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/square\/kotlinpoet\"><u>KotlinPoet<\/u><\/a>. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d <a href=\"https:\/\/kotlinlang.org\/docs\/kapt.html\"><u>kapt<\/u><\/a>, \u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u043d\u0430 <a href=\"https:\/\/kotlinlang.org\/docs\/ksp-overview.html\"><u>Kotlin Symbol Processing<\/u><\/a> \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u0440\u0443\u0433\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439, Dagger, \u043d\u0430\u0447\u043d\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c.<\/p>\n<h3>\u0418\u0442\u043e\u0433\u0438<\/h3>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u0423\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c TBD. \u041f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0438 \u0444\u0438\u0447\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u043b\u0438\u0437\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043d\u0435 \u0433\u043e\u0442\u043e\u0432.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0447\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c A\/B-\u0442\u0435\u0441\u0442\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Firebase, \u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438,\u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435 \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0431\u0430\u0433, \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0435\u0433\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0435\u043b\u0438\u0437\u0438\u0442\u044c \u0445\u043e\u0442\u0444\u0438\u043a\u0441 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 OpenSource, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0430\u043c \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442. \u041d\u043e, \u0431\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0447\u0442\u043e \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u043b\u0430 \u0432\u0441\u0435\u043c \u043d\u0430\u0448\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0438\u0441\u043a\u043d\u0443\u0442\u044c, \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0432\u043e\u044e \u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0431\u043e\u0439\u0442\u0435\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043e \u043d\u0430\u0448\u0435\u043c \u043e\u043f\u044b\u0442\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432, \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/company\/qiwi\/blog\/664152\/\"> https:\/\/habr.com\/ru\/company\/qiwi\/blog\/664152\/<\/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>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!\u00a0<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0412\u0430\u0441\u0438\u043b\u0438\u0439 \u041c\u0430\u0442\u0435\u0440\u0438\u043a\u0438\u043d, \u044f \u2014 Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 QIWI. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432 \u0432 QIWI \u041a\u043e\u0448\u0435\u043b\u044c\u043a\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 Trunk-Based Development \u0438 Feature Flags<\/h2>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043d\u043e\u0433\u043e \u0444\u0438\u0447 \u0438 \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0442\u0440\u0443\u0434\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043a\u0430\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432. \u041c\u044b \u0432 QIWI \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u044d\u0442\u0438\u043c \u0434\u0432\u0430 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434, \u043a\u043e\u0433\u0434\u0430 \u0432 QIWI \u041a\u043e\u0448\u0435\u043b\u044c\u043a\u0435 \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e feature-\u043a\u043e\u043c\u0430\u043d\u0434. \u0412\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 feature-\u0432\u0435\u0442\u043e\u043a \u043d\u0435 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e feature-\u043a\u043e\u043c\u0430\u043d\u0434, \u0432\u0435\u0442\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u044a\u0451\u043c\u043d\u044b\u043c\u0438. \u041f\u043e\u0442\u043e\u043c \u0441\u043c\u0435\u0440\u0436\u0438\u0442\u044c \u0438\u0445 \u0432 \u043c\u0430\u0441\u0442\u0435\u0440 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b.\u00a0<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/trunkbaseddevelopment.com\"><u>Trunk-Based Development<\/u><\/a> (TBD). TBD \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0435\u0442\u043a\u0430\u0445 \u0438, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0431\u044b\u043b\u0438 \u0432\u043b\u0438\u0442\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0438 \u0440\u0435\u0432\u044c\u044e \u0438 \u0431\u044b\u043b\u0438 \u0432\u043b\u0438\u0442\u044b \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443. \u042d\u0442\u043e, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u2014 \u043a\u043e\u0433\u0434\u0430 \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0435\u043b\u0438\u0437\u0443, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0440\u0435\u043b\u0438\u0437\u0438\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041c\u044b \u0436\u0435 \u0440\u0435\u043b\u0438\u0437\u044b \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0430\u0441\u0442\u043e. \u0418 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e TBD \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438, \u043a\u0430\u043a Branch by Abstraction (BBA) \u0438 Feature Flags (FF).<\/p>\n<p>BBA \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u0442\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c. \u0421\u0440\u0430\u0437\u0443 \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f (\u0443\u0436\u0435 \u0441 \u043d\u043e\u0432\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c) \u0438 \u0441 \u043d\u0435\u0439 \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0438\u0447\u0435\u0439 \u2014 \u044d\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0443\u0436\u0435 \u043d\u0430\u0434 \u043d\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0435\u0449\u0451 \u0441\u0442\u0430\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u0444\u0438\u0447\u0435\u0439.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 BBA, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 QIWI-\u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0440\u044b\u043c \u0438 \u043d\u043e\u0432\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c, \u043e\u043d\u0438 \u0435\u0449\u0435 \u0434\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>A\/B-\u0442\u0435\u0441\u0442\u044b. \u0415\u0441\u0442\u044c \u0434\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0438\u0447\u0438, \u0435\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0444\u0438\u0447\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0430\u0441\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u043b\u0438\u0437\u0438\u0442\u044c \u0445\u043e\u0442\u0444\u0438\u043a\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u0435.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0444\u0438\u0447\u0430-\u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u043f\u0440\u043e\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0444\u0438\u0447\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Feature Flags<\/h2>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Feature Flags \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 opensource-\u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043b\u044f Gradle, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u043b\u0430\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043b\u0430\u0441\u0441 BuildConfig \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442. \u041f\u043e\u0442\u043e\u043c \u0432 \u043a\u043e\u0434\u0435 \u043c\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u043e\u0436\u0435\u043c \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u0438 \u0444\u043b\u0430\u0433\u0438 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0444\u0438\u0447\u0438 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0441\u043e\u0432:\u00a0<\/p>\n<ul>\n<li>\n<p>\u041d\u0435\u043b\u044c\u0437\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433. ,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0444\u043b\u0430\u0433\u0430, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c <a href=\"https:\/\/github.com\/qiwi\/FeatureToggle\"><u>\u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438. \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a RxJava 2. \u041c\u044b \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0438 \u0435\u0451 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Kotlin Coroutines \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p><strong>compiler<\/strong> \u2014 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>feature-manager<\/strong> \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p><strong>converter-gson, converter-jackson<\/strong> \u2014 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432 \u0438\u0437 json;<\/p>\n<\/li>\n<li>\n<p><strong>datasource-firebase, datasource-agconnect<\/strong> \u2014 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Firebase Remote Config \u0438 Huawei Remote Config.<\/p>\n<\/li>\n<li>\n<p><strong>datasource-remote<\/strong> \u2014 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0444\u043b\u0430\u0433\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e http \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>datasource-debug<\/strong> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e adb (\u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433 \u0441\u0431\u043e\u0440\u043e\u043a).<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0421\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 FeatureManager, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0448\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432, \u0438 \u0443 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0444\u0438\u0447\u0443. \u0423 FeatureManager \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0444\u0438\u0447\u0443, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u0435 \u0442\u0438\u043f, \u043b\u0438\u0431\u043e \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0443. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u043a \u0444\u0430\u0431\u0440\u0438\u043a\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0438\u0447\u0438.\u00a0<\/p>\n<pre><code class=\"kotlin\">interface FeatureManager {          fun &lt;Flag> getFeatureFlag(flagClass: Class&lt;Flag>): Flag?      fun &lt;Feature> getFeature(featureClass: Class&lt;Feature>): Feature      fun &lt;Feature, Flag> getFeature(featureClass: Class&lt;Feature>, factory: FeatureFactory&lt;Feature, Flag>): Feature  }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f data-\u043a\u043b\u0430\u0441\u0441\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0439, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u0447\u0443.\u00a0<\/p>\n<pre><code class=\"kotlin\">@FeatureFlag(\"search_config\") data class SearchConfigFlag(     @JsonProperty(\"newSearch\")     val newSearch: Boolean,     @JsonProperty(\"remoteSearch\")     val remoteSearch: Boolean)<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0438\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f FeatureFactory \u2014 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434 <strong>createFeature<\/strong>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0438\u0447\u0438.\u00a0<\/p>\n<pre><code class=\"kotlin\">@Factory class SearchConfigFactory: FeatureFactory&lt;SearchConfig, SearchConfigFlag>() {      override fun createFeature(flag: SearchConfigFlag): SearchConfig = if(flag.newSearch) {         NewSearchConfig(flag.remoteSearch)     }     else {         createDefault()     }      override fun createDefault(): SearchConfig = OldSearchConfig()  }<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0437\u043d\u0430\u043b\u0430, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0438 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043d\u0438\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <strong>@FeatureFlag<\/strong> \u0438 <strong>@Factory<\/strong>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Annotation-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0440\u0435\u0435\u0441\u0442\u0440\u044b \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0438 \u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0430\u043c\u0438.<\/p>\n<pre><code class=\"kotlin\">@Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) annotation class FeatureFlag (     val key: String )<\/code><\/pre>\n<pre><code class=\"kotlin\">@Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) annotation class Factory<\/code><\/pre>\n<p>\u041d\u0430\u043c \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0434\u043e\u0448\u0435\u043b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0444\u0438\u0447\u0438 \u0438\u0437 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447\u0435\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f (\u0440\u0435\u0435\u0441\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u0447\u0435\u0439 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u043b\u0430\u0433\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438).<\/p>\n<h3>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/h3>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c. \u0422\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 FeatureManager. \u0412\u043d\u0443\u0442\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 FeatureManager \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 FeatureCreator, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0444\u0438\u0447\u0438. \u0427\u0442\u043e\u0431\u044b FeatureCreator \u0437\u043d\u0430\u043b, \u043a\u0430\u043a\u0438\u0435 \u0443 \u043d\u0435\u0433\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0441\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u0438 \u0444\u0430\u0431\u0440\u0438\u043a\u0438, \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b-\u0440\u0435\u0435\u0441\u0442\u0440\u044b \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u043e\u0432 (FeatureFlagRegistry) \u0438 \u0444\u0430\u0431\u0440\u0438\u043a (FeatureFactoryRegistry). \u042d\u0442\u043e \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439.\u00a0<\/p>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 FeatureRepository \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0438 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 FeatureFlagDataSource.\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u044b \u043a\u043b\u0430\u0434\u0435\u043c \u0432 JSON-\u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043f\u043a\u0435 assets. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c, \u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Firebase Remote Config, \u0435\u0441\u043b\u0438 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Google Play, \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Huawei Remote Config, \u0435\u0441\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u043b\u044f AppGallery.<\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u043b\u0430\u0433\u0438 \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 QIWI. \u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u0438\u0437 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u044d\u0448. \u041e\u0442\u0442\u0443\u0434\u0430 \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0445 \u0432\u0437\u044f\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441 \u0441\u0435\u0442\u044c\u044e \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438 \u0438\u0437 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u043b\u0430\u0433\u0438.\u00a0<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>FeatureCreator\u00a0<\/h3>\n<p>FeatureCreator \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0444\u0438\u0447\u0438. \u0423 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0438\u0447\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0442\u0438\u043f, \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432 FeatureCreator \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u043e\u0432.\u00a0<\/p>\n<pre><code class=\"kotlin\">interface FeatureCreator {      fun &lt;Feature> createFeature(featureClass: Class&lt;Feature>): Feature      fun &lt;Feature, Flag> createFeature(featureClass: Class&lt;Feature>, factory: FeatureFactory&lt;Feature, Flag>): Feature } <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0438\u0447\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u043d\u0435\u0435. \u041f\u043e\u0442\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0438 \u0444\u043b\u0430\u0433\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0438\u0447\u0438. \u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0435\u0441\u0442\u0440\u044b \u0434\u043b\u044f \u0444\u043b\u0430\u0433\u043e\u0432 \u0438 \u0444\u0430\u0431\u0440\u0438\u043a. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0438\u0447\u0443 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0444\u0438\u0447\u0430-\u0444\u043b\u0430\u0433\u0430 \u0432\u0434\u0440\u0443\u0433 \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c.\u00a0<\/p>\n<pre><code class=\"kotlin\">class RealFeatureCreator(     private val flagRegistry: FeatureFlagRegistry,     private val factoryRegistry: FeatureFactoryRegistry,     private val storage: ActualFlagsStorage,     private val logger: Logger ) : FeatureCreator {      @Suppress(\"UNCHECKED_CAST\")     override fun &lt;Feature> createFeature(featureClass: Class&lt;Feature>): Feature {         \/\/Find Pair of key and factory class in registry using provided feature class.         val factoryWithKey = factoryRegistry.getFactoryMap()[featureClass]             ?: throw getFeatureCreatorException(featureClass.simpleName)          \/\/Obtain feature key.         val featureKey = factoryWithKey.first          \/\/ Create instance of factory<\/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-332743","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332743","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=332743"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332743\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=332743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=332743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=332743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}