{"id":480295,"date":"2026-05-19T15:11:58","date_gmt":"2026-05-19T15:11:58","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=480295"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=480295","title":{"rendered":"\u042d\u0432\u043e\u043b\u044e\u0446\u0438\u044f API \u0431\u0435\u0437 \u0431\u043e\u043b\u0438: ArchUnit, Gradle \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412 Netflix \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043f\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 polyrepo \u2014 \u0443 \u043d\u0430\u0441 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0442\u044b\u0441\u044f\u0447 Java-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438. \u0412 <a href=\"https:\/\/sites.google.com\/netflix.com\/javaplatformnetflix\/jvm\">\u043a\u043e\u043c\u0430\u043d\u0434\u0435 JVM Ecosystem \u0432\u043d\u0443\u0442\u0440\u0438 Java Platform<\/a> \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/nebula-plugins\">\u043d\u0430\u0431\u043e\u0440 Gradle-\u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Nebula<\/a> \u0441 \u0446\u0435\u043b\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043f\u043e \u0432\u0441\u0435\u0439 Java-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041d\u0430\u0448\u0430 \u043c\u0438\u0441\u0441\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u00ab\u043f\u0440\u043e\u0442\u043e\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438\u00bb \u0438\u043b\u0438 \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u043b\u0433.<\/p>\n<h3>\u041a\u0435\u0439\u0441<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u0432 Netflix, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u0434\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043d\u0430\u0448\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c Java-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u042d\u0442\u043e \u0431\u044b\u043b \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0431\u0435\u0437\u0440\u0430\u0441\u0441\u0443\u0434\u043d\u043e\u0433\u043e breaking change. \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0433\u043e\u0434\u0430\u043c\u0438. \u0410\u0432\u0442\u043e\u0440\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0447\u0430\u0441\u0442\u043e \u0442\u044f\u0436\u0435\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u043a\u043e\u0434 \u0438\u043b\u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f downstream-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u041c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043f\u0430\u0440\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0436\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Spring Boot, \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u0441 \u044d\u0442\u0438\u043c, \u043c\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 API:<\/p>\n<ul>\n<li>\n<p><code>@Deprecated<\/code> \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Java<\/p>\n<\/li>\n<li>\n<p><code>@Public<\/code> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f downstream<\/p>\n<\/li>\n<li>\n<p><code>@Experimental<\/code> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 API \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u00ab\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438\u00bb<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042f\u0432\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0434\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u044f\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0430 \u0441\u0432\u0439\u043e \u0442\u0443\u043b\u0438\u043d\u0433, \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Java \u043c\u043e\u0434\u0443\u043b\u0438. \u0410 \u0432\u0435\u0434\u044c Java \u043c\u043e\u0434\u0443\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435, \u043e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435. \u041d\u0430 \u0440\u0435\u0434\u0438\u0442\u0435 \u0431\u044b\u043b\u0430 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u044f \u043f\u043e\u0441\u043b\u0435 Q&amp;A \u0441\u0435\u0441\u0441\u0438\u0438 \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 Java, \u0433\u0434\u0435 \u0438\u043c \u0437\u0430\u0434\u0430\u043b\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: &#171;\u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442?&#187; \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0438 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u044e:\u00a0<\/p>\n<p><a href=\"https:\/\/www.reddit.com\/r\/java\/comments\/1stf7gs\/ask_the_architects_javaone_2026\/\">https:\/\/www.reddit.com\/r\/java\/comments\/1stf7gs\/ask_the_architects_javaone_2026\/<\/a><\/p>\n<\/div>\n<\/details>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0442\u044c \u0441\u0432\u043e\u0438 API \u044d\u0442\u0438\u043c\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438. \u041d\u043e \u043a\u0430\u043a \u0438\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 downstream-\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0445 API \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u044d\u0442\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b?<\/p>\n<p>\u041f\u043e \u043c\u0435\u0440\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0443\u043b\u0443\u0447\u0448\u0430\u043b\u0438 \u00ab\u043f\u0440\u043e\u0442\u043e\u0440\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c\u00bb \u0434\u043b\u044f JVM-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 Netflix, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u043b\u0433 \u2014 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 Java Platform, \u043d\u043e \u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0449\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u043a ArchUnit.<\/p>\n<p><a href=\"https:\/\/www.archunit.org\/\">ArchUnit<\/a> \u2014 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f open source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 (3,5 \u0442\u044b\u0441. \u0437\u0432\u0435\u0437\u0434, 84 \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440\u0430), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u00ab\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445\u00bb \u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043e\u0434\u0430 \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u0438 JUnit-\u043d\u0430\u0431\u043e\u0440\u0430. \u0415\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 Gradle \u0438 Spring, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043d\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 <a href=\"https:\/\/spring.io\/projects\/spring-modulith\">Spring Modulith<\/a>. \u0414\u0432\u0438\u0436\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u043e\u0432\u0435\u0440\u0445 <a href=\"https:\/\/asm.ow2.io\/\">ASM<\/a>, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432. \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0436\u044a\u044f\u0437\u044b\u043a\u043e\u0432\u043e (\u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435 JVM), \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 ASM\/\u0431\u0430\u0439\u0442\u043a\u043e\u0434, \u0430 \u043d\u0435 \u0440\u0430\u0437\u0431\u043e\u0440 AST.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 builder-\u0441\u0442\u0438\u043b\u044c API, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 API, \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 ArchUnit \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 JUnit-\u043d\u0430\u0431\u043e\u0440\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u041f\u043b\u0430\u0433\u0438\u043d\u044b Nebula ArchRules \u0434\u0430\u044e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0432 \u043b\u044e\u0431\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0438\u0437 open source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043b\u0438 \u0438\u0437 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u0441 JVM \u0438 Gradle.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 ArchUnit?<\/h3>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 ArchRules, \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ArchUnit \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u0430 \u043d\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<h4>AST \u043f\u0440\u043e\u0442\u0438\u0432 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430<\/h4>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 PMD, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a AST (abstract syntax tree \u2014 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c\u0443 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0434\u0435\u0440\u0435\u0432\u0443). AST \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0422\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 AST \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u043e\u0432 JVM \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Kotlin \u0438\u043b\u0438 Scala, \u2014 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u044f\u0437\u044b\u043a. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c, \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0430\u0445\u0430\u0440\u043e\u043c, \u043d\u0435 \u0443\u0447\u0442\u0435\u043d\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430. ArchUnit \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 ASM, \u0447\u0442\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u0439\u0442\u043a\u043e\u0434, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d. \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<h4>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/h4>\n<p>\u0422\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u0430\u043a PMD \u0438 Spotbugs, \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f PMD:<\/p>\n<pre><code class=\"bash\">&lt;![CDATA[ \/\/AllocationExpression\/ClassOrInterfaceType[   @Image='DateTime' and (       (count(..\/\/Name[@Image='DateTimeZone.UTC'])&lt;=0)       and       (count(..\/\/Name[@Image='DateTimeZone.forID'])&lt;=0)    ) or (       (           (count(..\/\/Name[@Image='DateTimeZone.UTC'])&gt;0)             or           (count(..\/\/Name[@Image='DateTimeZone.forID'])&gt;0)       ) and (..\/Arguments\/ArgumentList and count(..\/Arguments\/ArgumentList\/Expression) = 1)   ) ]]]&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e <code>DateTime<\/code> \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u0435\u0437 \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u044b. \u042d\u0442\u043e \u00ab\u0441\u044b\u0440\u0430\u044f\u00bb \u0441\u0442\u0440\u043e\u043a\u0430, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 xpath-\u043f\u0430\u0440\u0441\u0435\u0440\u0435 PMD. \u041f\u0440\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u0435\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a IDE. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 PMD, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441 ArchUnit:<\/p>\n<pre><code class=\"java\">ArchRuleDefinition.priority(Priority.MEDIUM).noClasses().should().callConstructorWhere(    \/\/ constructor does not have a zone arguement    target(doesNot(have(rawParameterTypes(DateTimeZone.class))))   \/\/ constructor is for DateTime        .and(targetOwner(assignableTo(DateTime.class))))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u0442\u043e \u0442\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 Java-\u043a\u043e\u0434 \u0441 fluent API. \u0415\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0442\u044c unit-\u0442\u0435\u0441\u0442\u0430\u043c\u0438: \u0432 ArchUnit \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<h4>\u0421\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438<\/h4>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ArchUnit \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c classpath \u0447\u0435\u0440\u0435\u0437 ASM, \u043e\u043d \u0445\u0440\u0430\u043d\u0438\u0442 \u0433\u0440\u0430\u0444 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u043c \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438 \u043f\u043e \u043c\u0435\u0441\u0442\u0430\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u0432. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d\u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044e\u0442.<\/p>\n<h3>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 ArchUnit \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/nebula-plugins\/nebula-archrules-plugin?tab=readme-ov-file#authoring-rules\">\u043f\u043b\u0430\u0433\u0438\u043d ArchRules Library<\/a>. \u042d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 Gradle-\u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 source set \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>archRules<\/code>. \u0412 \u044d\u0442\u043e\u043c source set \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>ArchRulesService<\/code>. \u0423 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 <code>Map&lt;String, ArchRule&gt;<\/code>. \u041a\u043b\u044e\u0447\u0438 \u044d\u0442\u043e\u0439 map \u2014 \u0438\u043c\u0435\u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b, \u0430 ArchRule \u2014 \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e API ArchUnit. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\">public class GuavaRules implements ArchRulesService {  static final ArchRule OPTIONAL = ArchRuleDefinition.priority(Priority.MEDIUM)        .noClasses()        .should()        .dependOnClassesThat()        .haveFullyQualifiedName(\"com.google.common.base.Optional\")        .because(\"Java Optional is preferred over Guava Optional\");    @Override    public Map&lt;String, ArchRule&gt; getRules() {        Map&lt;String, ArchRule&gt; rules = new HashMap&lt;&gt;();        rules.put(\"guava optional\", OPTIONAL);        return rules;    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 JAR \u0441 classifier arch-rules. \u041f\u0440\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 JAR \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c usage, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0432 arch-rules. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 downstream-\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c Gradle Module Metadata \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438: \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 (bundled) \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u043d\u0438, \u0433\u0440\u0443\u0431\u043e, \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 JAR \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c archunit \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438.<\/p>\n<p>\u0418 \u0443\u0436\u0435 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0445 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 Nebula \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0430\u0445\u043e\u0438\u0442 \u044d\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u0442\u0435\u0441\u0442\u044b.<\/p>\n<\/div>\n<\/details>\n<h3>\u0410\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b<\/h3>\n<p>\u0410\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430: \u0442\u043e\u043b\u044c\u043a\u043e <code>archRules<\/code>. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u043d\u0435 \u0432\u043b\u0430\u0434\u0435\u0435\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f API Core Java \u0438\u043b\u0438 open source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u043a\u043e\u0434\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u0434, \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u043a <code>@Deprecated<\/code>\u00bb. \u041c\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e open source \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u043e\u0439 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439; \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u0443\u0436\u0430\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u043f\u0440\u0430\u0432\u0438\u043b \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0441\u0438\u043b\u0430 ArchRules \u2014 \u0432 \u00ab\u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u00bb.<\/p>\n<h3>\u041f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b<\/h3>\n<p>\u041f\u0430\u043a\u0435\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u2014 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434, \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 <code>archRules<\/code>. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 source set \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u2014 \u043a\u0430\u043a\u043e\u0439 \u0431\u044b \u043e\u043d \u043d\u0438 \u0431\u044b\u043b. \u0410 \u0432 <code>archRules<\/code> \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u043c \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 API \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c, \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043b\u0430\u0433\u0438\u043d ArchRules Runner \u0441\u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u0445 source set\u2019\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u041f\u0440\u0438\u043c\u0435\u0440 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Nebula Test.<\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Gradle \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 ServiceLoader \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e <code>ArchRulesService<\/code>, \u0447\u0442\u043e\u0431\u044b runner \u043c\u043e\u0433 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u0430\u0448\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p><code>ServiceLoader<\/code> \u044d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 SPI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435. \u0412\u0435\u0437\u0434\u0435\u0441\u0443\u0449\u0438\u0439 SLF4J \u0442\u0430\u043a \u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<\/div>\n<\/details>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0430\u0432\u0438\u043b<\/h3>\n<p>\u041f\u043b\u0430\u0433\u0438\u043d ArchRules Runner \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435. \u0410\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0442\u044c \u043f\u043e \u0432\u0441\u0435\u043c source set\u2019\u0430\u043c, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0438\u0445 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e archRules \u0432 \u0432\u0430\u0448\u0435\u043c build-\u0444\u0430\u0439\u043b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"yaml\">dependencies {  archRules(\"your:rules:1.0.0\")}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u0436\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439) \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e runner-\u043f\u043b\u0430\u0433\u0438\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0430\u0448\u0435\u0433\u043e source set\u2019\u0430. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 classpath archRules \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u0441\u044f \u0441 <code>runtimeClasspath<\/code>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442 arch-rules. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 classpath \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 <code>ServiceLoader<\/code> \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>ArchRulesService<\/code>.\u00a0<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0422\u0443\u0442 \u0440\u0435\u0447\u044c \u043f\u0440\u043e Gradle Configuration. \u0414\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 Maven: \u044d\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 scopes, \u0445\u043e\u0442\u044f \u0438 \u0442\u0430\u043a\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u043e\u0440\u0440\u043a\u0435\u0442\u043d\u043e, \u043d\u043e \u043e\u043d\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e.<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443-\u0445\u0435\u043b\u043f\u0435\u0440 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <code>testImplementation<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e <code>archRules<\/code>. Runtime classpath \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e implementation JAR \u0445\u0435\u043b\u043f\u0435\u0440-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u043e arch rules runtime \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c archrules JAR \u0434\u043b\u044f \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b. \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a5\/993\/909\/6a5993909bacefa32589ccf96ba36b91.png\" width=\"1400\" height=\"816\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/6a5\/993\/909\/6a5993909bacefa32589ccf96ba36b91.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a5\/993\/909\/6a5993909bacefa32589ccf96ba36b91.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a classpath \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d, runner-\u043f\u043b\u0430\u0433\u0438\u043d \u0441\u043e\u0437\u0434\u0430\u0441\u0442 Gradle work action, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 source set\u2019\u0443. \u042d\u0442\u043e\u0442 action \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0435\u0439 classpath, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e *archRuleRuntime. \u0412\u043d\u0443\u0442\u0440\u0438 action \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f ServiceLoader \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u0430\u0432\u0438\u043b. \u0417\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f action \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u043e\u0432.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0433\u0434\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 archRules. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<pre><code class=\"yaml\">archRules {    ruleClass(\"com.netflix.nebula.archrules.deprecation\") {        priority(\"HIGH\")    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u0440\u0435\u0434\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u2014 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 source set\u2019\u043e\u0432 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0440\u043e\u0433\u0430 \u00ab\u043f\u0430\u0434\u0435\u043d\u0438\u044f\u00bb \u0441\u0431\u043e\u0440\u043a\u0438 (\u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c \u043f\u0440\u0438\u0432\u0435\u0434\u0443\u0442 \u043a \u043f\u0430\u0434\u0435\u043d\u0438\u044e \u0441\u0431\u043e\u0440\u043a\u0438).<\/p>\n<h3>\u041e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u044c<\/h3>\n<p>\u041f\u043b\u0430\u0433\u0438\u043d ArchRules runner \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043e\u0442\u0447\u0435\u0442\u0430: JSON \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439. JSON-\u043e\u0442\u0447\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u043f\u043e \u0432\u0441\u0435\u043c source set\u2019\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043e\u0434\u0438\u043d JSON-\u0444\u0430\u0439\u043b \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u043f\u043e \u0432\u0441\u0435\u043c source set\u2019\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043e\u0442\u0447\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0a4\/bfa\/d6e\/0a4bfad6e0e93fb0addd0a2903e71b28.png\" width=\"750\" height=\"373\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/0a4\/bfa\/d6e\/0a4bfad6e0e93fb0addd0a2903e71b28.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0a4\/bfa\/d6e\/0a4bfad6e0e93fb0addd0a2903e71b28.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0434\u0435\u0442\u0430\u043b\u0438 \u0441\u0431\u043e\u0435\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0442\u043e\u0447\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u043e\u0434\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u043e \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JSON-\u0444\u0430\u0439\u043b, \u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0442\u0430\u0441\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0438\u0442\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0442\u0430\u0441\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0435\u043f\u043e\u0440\u0442\u0438\u043d\u0433 \u0432 runner-\u043f\u043b\u0430\u0433\u0438\u043d\u0435 ArchRules.<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0435\u0439\u0441\u0430<\/h3>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u043d\u0430\u0448\u0435\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f ArchRules, \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 API. \u041e\u043d\u0438 \u043f\u0438\u0448\u0443\u0442 <code>ArchRules<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\">ArchRuleDefinition.priority(Priority.MEDIUM)    .noClasses().that(resideOutsideOfPackage(packageName + \"..\"))    .should()    .dependOnClassesThat(resideInAPackage(packageName + \"..\").and(are(deprecated())))    .orShould().accessTargetWhere(targetOwner(resideInAPackage(packageName + \"..\"))        .and(target(is(deprecated())).or(targetOwner(is(deprecated())))))    .allowEmptyShould(true)    .because(\"Deprecated APIs are subject to removal\");<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430\u0448 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 Gradle wrapper \u0438 <a href=\"https:\/\/github.com\/nebula-plugins\/nebula-archrules\/blob\/main\/archrules-common\/src\/main\/java\/com\/netflix\/nebula\/archrules\/common\/CanBeAnnotated.java\">\u043d\u0430\u0431\u043e\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 Nebula<\/a> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 ArchRules runner \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0440\u0435\u043f\u043e\u0440\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0447\u0435\u0442\u0430 \u0432 \u043d\u0430\u0448 Internal Developer Portal \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c CI-\u0431\u0438\u043b\u0434\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438. \u0422\u0430\u043a \u0430\u0432\u0442\u043e\u0440\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043c\u043e\u0433\u0443\u0442 \u043b\u0435\u0433\u043a\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u043e\u0431\u043e \u0432\u0441\u0435\u0445 downstream-\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435, \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 API, \u2014 \u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u00ab\u043b\u043e\u043c\u0430\u044e\u0449\u0438\u0435\u00bb \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0437\u043d\u0430\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u0435\u0442 downstream-\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439. \u0415\u0441\u043b\u0438 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438\u0437-\u0437\u0430 downstream-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0442 \u043e\u0431 \u044d\u0442\u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u0445.<\/p>\n<h3>OSS-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b<\/h3>\n<p>\u0425\u043e\u0442\u044f \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ArchRules \u2014 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/github.com\/nebula-plugins\/nebula-archrules\">open source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0440\u0430\u0432\u0438\u043b<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u043e\u0439 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u0438\u043b\u0438 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u044b.<\/p>\n<h4>Nullability<\/h4>\n<p>\u042d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 nullable \u0432 Java \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0431\u044b\u043b \u043f\u043e\u043c\u0435\u0447\u0435\u043d <code>@NullMarked<\/code> \u0438\u0437 <a href=\"https:\/\/jspecify.dev\/\">JSpecify<\/a>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u00ab\u0443\u043c\u043d\u044b\u0435\u00bb, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0442\u044c Kotlin-\u043a\u043e\u0434, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 Kotlin nullability \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043d\u0435 \u043d\u0430\u0434\u043e \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. \u041e\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430 \u043e\u0442\u043a\u0443\u043f \u0430\u0432\u0442\u043e\u0440\u0430\u043c.<\/p>\n<\/div>\n<\/details>\n<h4>Best practices \u0434\u043b\u044f Gradle-\u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/h4>\n<p><a href=\"https:\/\/docs.gradle.org\/current\/userguide\/writing_plugins.html\">\u041f\u0438\u0441\u0430\u0442\u044c Gradle-\u043f\u043b\u0430\u0433\u0438\u043d\u044b<\/a> \u0431\u044b\u0432\u0430\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e \u2014 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e API \u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u042d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 best practices \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 Gradle-\u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432.<\/p>\n<h4>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f Joda \/ Guava<\/h4>\n<p>\u042d\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b discouraging \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 Joda Time \u0438 Guava (\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e), \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0445 \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 <code>java.time<\/code> \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<h4>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u042d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043d\u0438\u0436\u0430\u0442\u044c \u0440\u0438\u0441\u043a CVE, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u044b\u0445 API. \u0412 \u0438\u0434\u0435\u0430\u043b\u0435 CVE \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443, \u0438 \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0439, \u0447\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u044b\u0439 API \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c 358 (\u0438 \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0441\u0442\u0435\u0442) \u043f\u0440\u0430\u0432\u0438\u043b \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 5 000 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0447\u0442\u0438 1 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041e\u043a\u043e\u043b\u043e 1 000 \u0438\u0437 \u043d\u0438\u0445 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0441 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c \u00abHigh\u00bb. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043d\u0441\u0430\u0439\u0442\u044b \u043f\u043e \u043d\u0430\u0448\u0435\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u043f\u0430\u0440\u043a\u0443 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u0441\u0430\u043c\u044b\u043c \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u043e\u043b\u0433\u043e\u043c. \u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0443\u0441\u0438\u043b\u0438\u0439.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0443\u0447\u0430\u0442\u044c, \u043a\u0430\u043a \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e-\u0440\u0435\u043c\u0435\u0434\u0438\u0430\u0446\u0438\u0438 \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c ArchRules. ArchUnit \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043e\u0442\u0447\u0435\u0442\u0430\u0445 \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0431\u043e\u044f\u0445, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0434\u043b\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0430\u0432\u0442\u043e-\u0440\u0435\u043c\u0435\u0434\u0438\u0430\u0446\u0438\u0438. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435 <a href=\"https:\/\/docs.openrewrite.org\/\">OpenRewrite<\/a> \u0438 \u043d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435 LLM. \u0421\u0432\u044f\u0437\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 ArchUnit \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0430\u0432\u0442\u043e-\u0440\u0435\u043c\u0435\u0434\u0438\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438 \u0440\u0435\u0448\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/258\/484\/92d\/25848492d4cd2dcd1df595e475569a9a.png\" width=\"1560\" height=\"334\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/258\/484\/92d\/25848492d4cd2dcd1df595e475569a9a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/258\/484\/92d\/25848492d4cd2dcd1df595e475569a9a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><a href=\"https:\/\/t.me\/+acrI2N6q080wZjM6\">\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c<\/a>\u00a0\u043a\u00a0\u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430\u00a0Spring Boot \u0432\u00a0\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u00a0\u2014\u00a0<a href=\"https:\/\/t.me\/+acrI2N6q080wZjM6\">Spring \u0410\u0439\u041e<\/a>, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0432 \u043a\u0443\u0440\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 \u043c\u0438\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 Spring Boot \u0438 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043e.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1037012\/\">https:\/\/habr.com\/ru\/articles\/1037012\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u0412 Netflix \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043f\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 polyrepo \u2014 \u0443 \u043d\u0430\u0441 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0442\u044b\u0441\u044f\u0447 Java-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438. \u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 JVM Ecosystem \u0432\u043d\u0443\u0442\u0440\u0438 Java Platform \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0431\u043e\u0440 Gradle-\u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Nebula \u0441 \u0446\u0435\u043b\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043f\u043e \u0432\u0441\u0435\u0439 Java-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041d\u0430\u0448\u0430 \u043c\u0438\u0441\u0441\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u00ab\u043f\u0440\u043e\u0442\u043e\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438\u00bb \u0438\u043b\u0438 \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u043b\u0433.\u041a\u0435\u0439\u0441\u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u0432 Netflix, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u0434\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043d\u0430\u0448\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c Java-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u042d\u0442\u043e \u0431\u044b\u043b \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0431\u0435\u0437\u0440\u0430\u0441\u0441\u0443\u0434\u043d\u043e\u0433\u043e breaking change. \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0433\u043e\u0434\u0430\u043c\u0438. \u0410\u0432\u0442\u043e\u0440\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0447\u0430\u0441\u0442\u043e \u0442\u044f\u0436\u0435\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u043a\u043e\u0434 \u0438\u043b\u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f downstream-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u041c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043f\u0430\u0440\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0436\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Spring Boot, \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u0441 \u044d\u0442\u0438\u043c, \u043c\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 API:@Deprecated \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Java@Public \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f downstream@Experimental \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 API \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u00ab\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438\u00bb\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0430\u042f\u0432\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0434\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u044f\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0430 \u0441\u0432\u0439\u043e \u0442\u0443\u043b\u0438\u043d\u0433, \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Java \u043c\u043e\u0434\u0443\u043b\u0438. \u0410 \u0432\u0435\u0434\u044c Java \u043c\u043e\u0434\u0443\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435, \u043e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435. \u041d\u0430 \u0440\u0435\u0434\u0438\u0442\u0435 \u0431\u044b\u043b\u0430 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u044f \u043f\u043e\u0441\u043b\u0435 Q&amp;A \u0441\u0435\u0441\u0441\u0438\u0438 \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 Java, \u0433\u0434\u0435 \u0438\u043c \u0437\u0430\u0434\u0430\u043b\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: &#171;\u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442?&#187; \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0438 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u044e:\u00a0https:\/\/www.reddit.com\/r\/java\/comments\/1stf7gs\/ask_the_architects_javaone_2026\/\u0410\u0432\u0442\u043e\u0440\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0442\u044c \u0441\u0432\u043e\u0438 API \u044d\u0442\u0438\u043c\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438. \u041d\u043e \u043a\u0430\u043a \u0438\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 downstream-\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0445 API \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u044d\u0442\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b?\u041f\u043e \u043c\u0435\u0440\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0443\u043b\u0443\u0447\u0448\u0430\u043b\u0438 \u00ab\u043f\u0440\u043e\u0442\u043e\u0440\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c\u00bb \u0434\u043b\u044f JVM-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 Netflix, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u043b\u0433 \u2014 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 Java Platform, \u043d\u043e \u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0449\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u043a ArchUnit.ArchUnit \u2014 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f open source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 (3,5 \u0442\u044b\u0441. \u0437\u0432\u0435\u0437\u0434, 84 \u043a\u043e\u043d\u0442\u0440\u0438\u0431\u044c\u044e\u0442\u043e\u0440\u0430), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u00ab\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445\u00bb \u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043e\u0434\u0430 \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u0438 JUnit-\u043d\u0430\u0431\u043e\u0440\u0430. \u0415\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 Gradle \u0438 Spring, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043d\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Spring Modulith. \u0414\u0432\u0438\u0436\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u043e\u0432\u0435\u0440\u0445 ASM, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432. \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438:\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0436\u044a\u044f\u0437\u044b\u043a\u043e\u0432\u043e (\u0432 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435 JVM), \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 ASM\/\u0431\u0430\u0439\u0442\u043a\u043e\u0434, \u0430 \u043d\u0435 \u0440\u0430\u0437\u0431\u043e\u0440 AST.\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 builder-\u0441\u0442\u0438\u043b\u044c API, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b.\u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 API, \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b.\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 ArchUnit \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 JUnit-\u043d\u0430\u0431\u043e\u0440\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u041f\u043b\u0430\u0433\u0438\u043d\u044b Nebula ArchRules \u0434\u0430\u044e\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0432 \u043b\u044e\u0431\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432. \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0438\u0437 open source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043b\u0438 \u0438\u0437 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u0441 JVM \u0438 Gradle.\u041f\u043e\u0447\u0435\u043c\u0443 ArchUnit?\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 ArchRules, \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ArchUnit \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u0430 \u043d\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.AST \u043f\u0440\u043e\u0442\u0438\u0432 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 PMD, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a AST (abstract syntax tree \u2014 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c\u0443 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0434\u0435\u0440\u0435\u0432\u0443). AST \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0422\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 AST \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u043e\u0432 JVM \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Kotlin \u0438\u043b\u0438 Scala, \u2014 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u044f\u0437\u044b\u043a. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c, \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0430\u0445\u0430\u0440\u043e\u043c, \u043d\u0435 \u0443\u0447\u0442\u0435\u043d\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430. ArchUnit \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 ASM, \u0447\u0442\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u0439\u0442\u043a\u043e\u0434, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d. \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f.\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0422\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u0430\u043a PMD \u0438 Spotbugs, \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f PMD:&lt;![CDATA[ \/\/AllocationExpression\/ClassOrInterfaceType[   @Image=&#8217;DateTime&#8217; and (       (count(..\/\/Name[@Image=&#8217;DateTimeZone.UTC&#8217;])&lt;=0)       and       (count(..\/\/Name[@Image=&#8217;DateTimeZone.forID&#8217;])&lt;=0)    ) or (       (           (count(..\/\/Name[@Image=&#8217;DateTimeZone.UTC&#8217;])&gt;0)             or           (count(..\/\/Name[@Image=&#8217;DateTimeZone.forID&#8217;])&gt;0)       ) and (..\/Arguments\/ArgumentList and count(..\/Arguments\/ArgumentList\/Expression) = 1)   ) ]]]&gt;\u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e DateTime \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u0435\u0437 \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u044b. \u042d\u0442\u043e \u00ab\u0441\u044b\u0440\u0430\u044f\u00bb \u0441\u0442\u0440\u043e\u043a\u0430, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 xpath-\u043f\u0430\u0440\u0441\u0435\u0440\u0435 PMD. \u041f\u0440\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u0435\u0442 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a IDE. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 PMD, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441 ArchUnit:ArchRuleDefinition.priority(Priority.MEDIUM).noClasses().should().callConstructorWhere(    \/\/ constructor does not have a zone arguement    target(doesNot(have(rawParameterTypes(DateTimeZone.class))))   \/\/ constructor is for DateTime        .and(targetOwner(assignableTo(DateTime.class))))\u042d\u0442\u043e \u0442\u0438\u043f\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 Java-\u043a\u043e\u0434 \u0441 fluent API. \u0415\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0442\u044c unit-\u0442\u0435\u0441\u0442\u0430\u043c\u0438: \u0432 ArchUnit \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.\u0421\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ArchUnit \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c classpath \u0447\u0435\u0440\u0435\u0437 ASM, \u043e\u043d \u0445\u0440\u0430\u043d\u0438\u0442 \u0433\u0440\u0430\u0444 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u043c \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438 \u043f\u043e \u043c\u0435\u0441\u0442\u0430\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u0432. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d\u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044e\u0442.\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 ArchUnit \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d ArchRules Library. \u042d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 Gradle-\u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 source set \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c archRules. \u0412 \u044d\u0442\u043e\u043c source set \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 ArchRulesService. \u0423 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 Map&lt;String, ArchRule&gt;. \u041a\u043b\u044e\u0447\u0438 \u044d\u0442\u043e\u0439 map \u2014 \u0438\u043c\u0435\u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b, \u0430 ArchRule \u2014 \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e API ArchUnit. \u041f\u0440\u0438\u043c\u0435\u0440:public class GuavaRules implements ArchRulesService {  static final ArchRule OPTIONAL = ArchRuleDefinition.priority(Priority.MEDIUM)        .noClasses()        .should()        .dependOnClassesThat()        .haveFullyQualifiedName(&#171;com.google.common.base.Optional&#187;)        .because(&#171;Java Optional is preferred over Guava Optional&#187;);    @Override    public Map&lt;String, ArchRule&gt; getRules() {        Map&lt;String, ArchRule&gt; rules = new HashMap&lt;&gt;();        rules.put(&#171;guava optional&#187;, OPTIONAL);        return rules;    }}\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 JAR \u0441 classifier arch-rules. \u041f\u0440\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 JAR \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c usage, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0432 arch-rules. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 downstream-\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c Gradle Module Metadata \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438: \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 (bundled) \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b.\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0430\u041d\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u043d\u0438, \u0433\u0440\u0443\u0431\u043e, \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 JAR \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c archunit \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438.\u0418 \u0443\u0436\u0435 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0445 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 Nebula \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0430\u0445\u043e\u0438\u0442 \u044d\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u0442\u0435\u0441\u0442\u044b.\u0410\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0410\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430: \u0442\u043e\u043b\u044c\u043a\u043e archRules. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u043d\u0435 \u0432\u043b\u0430\u0434\u0435\u0435\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f API Core Java \u0438\u043b\u0438 open source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u043a\u043e\u0434\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u0434, \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u043a @Deprecated\u00bb. \u041c\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e open source \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u043e\u0439 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439; \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u0443\u0436\u0430\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u043f\u0440\u0430\u0432\u0438\u043b \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0441\u0438\u043b\u0430 ArchRules \u2014 \u0432 \u00ab\u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u00bb.\u041f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u041f\u0430\u043a\u0435\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u2014 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434, \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 archRules. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 source set \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u2014 \u043a\u0430\u043a\u043e\u0439 \u0431\u044b \u043e\u043d \u043d\u0438 \u0431\u044b\u043b. \u0410 \u0432 archRules \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u043c \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 API \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c, \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043b\u0430\u0433\u0438\u043d ArchRules Runner \u0441\u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u0445 source set\u2019\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u041f\u0440\u0438\u043c\u0435\u0440 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Nebula Test.\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Gradle \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 ServiceLoader \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e ArchRulesService, \u0447\u0442\u043e\u0431\u044b runner \u043c\u043e\u0433 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u0430\u0448\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430.\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-480295","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/480295","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=480295"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/480295\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=480295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=480295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=480295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}