Как стать автором
Поиск
Написать публикацию
Обновить

Владелец кода, отзовись! Как построить и применить систему владения кодом

Уровень сложностиПростой
Время на прочтение5 мин
Количество просмотров1.6K
Всего голосов 13: ↑13 и ↓0+23
Комментарии1

Комментарии 1

kotlin</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">// Файл buildSrc/src/main/kotlin/OwnershipPlugin.kt</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">import org.gradle.api.Plugin</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">import org.gradle.api.Project</span></p><p class="p2" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; min-height: 22px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"></span><br></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">open class OwnershipExtension {</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>var owner: String? = null</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">}</span></p><p class="p2" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; min-height: 22px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"></span><br></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">class OwnershipPlugin : Plugin&lt;Project&gt; {</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>override fun apply(project: Project) {</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">       <span class="Apple-converted-space"> </span></span>project.subprojects.forEach { subProject -&gt;</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">           <span class="Apple-converted-space"> </span></span>subProject.extensions.create("ownership", OwnershipExtension::class.java)</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">       <span class="Apple-converted-space"> </span></span>}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">}</span></p><p class="p2" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; min-height: 22px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"></span><br></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">// Файл buildSrc/src/main/kotlin/ModuleDependencyAnalyzer.kt</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">class ModuleDependencyAnalyzer : Plugin&lt;Project&gt; {</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>override fun apply(project: Project) {</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">       <span class="Apple-converted-space"> </span></span>project.afterEvaluate {</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">           <span class="Apple-converted-space"> </span></span>it.subprojects.forEach { subProject -&gt;</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">               <span class="Apple-converted-space"> </span></span>subProject.configurations.forEach { config -&gt;</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">                   <span class="Apple-converted-space"> </span></span>config.dependencies.forEach { dependency -&gt;</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">                       <span class="Apple-converted-space"> </span></span>val ownerExt = subProject.extensions.findByType(OwnershipExtension::class.java)?.owner</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">                       <span class="Apple-converted-space"> </span></span>println("Module ${subProject.name} depends on ${dependency.name} owned by $ownerExt")</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">                   <span class="Apple-converted-space"> </span></span>}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">               <span class="Apple-converted-space"> </span></span>}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">           <span class="Apple-converted-space"> </span></span>}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">       <span class="Apple-converted-space"> </span></span>}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">


### 2. Использование плагина


Добавьте плагин в файлы сборки модулей, чтобы указать владельца:


kotlin</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">// В файле build.gradle.kts каждого модуля</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">plugins {</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>id("inv.ownership")</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">}</span></p><p class="p2" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; min-height: 22px; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"></span><br></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">ownership {</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;"><span class="Apple-converted-space">   <span class="Apple-converted-space"> </span></span>owner = "Team Name"</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">}</span></p><p class="p1" style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: 400; font-stretch: normal; font-size: 17px; line-height: normal; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="s1" style="font-family: UICTFontTextStyleBody; font-weight: normal; font-style: normal; font-size: 17px;">

Зарегистрируйтесь на Хабре, чтобы оставить комментарий