2æäžæ¬ã Kaspersky Mobile Talksã® Androidéçºè åãã®äŒè°çšã®æ°ãã圢åŒãéå§ããŸããã éåžžã®éäŒãšã®äž»ãªéãã¯ãäœçŸäººãã®ãªã¹ããŒãçŸãããã¬ãŒã³ããŒã·ã§ã³ã®ä»£ããã«ããçµéšè±å¯ãªãéçºè ãããã€ãã®ç°ãªããããã¯ã«éãŸã£ãŠã1ã€ã®ãããã¯ã ããè°è«ããããšã§ãïŒã¢ããªã±ãŒã·ã§ã³ã§ã®ãã«ãã¢ãžã¥ãŒã«ã®å®è£ æ¹æ³ãçŽé¢ããåé¡ã解決æ¹æ³ã§ãã
å 容
- èæ¯
- HeadHunterã®ã¡ãã£ãšãŒã¿ãŒã ã¢ã¬ã¯ãµã³ããŒã»ããªãã
- Tinkoffãã¡ã€ã³ã¢ãžã¥ãŒã« ãŠã©ãžããŒã«ã»ã³ããããã¢ã¬ã¯ãµã³ããŒã»ãžã¥ãŒã³ã
- Avitoã®åœ±é¿åæã ãšãã²ããŒã»ã¯ãªããã³ããããã€ã«ã»ãŠãã£ã³
- Tinkoffãšåæ§ã«ã圌ãã¯PRã®çµã¿ç«ãŠæéã40åãã4åã«ççž®ããŸããã ãŠã©ãžããŒã«ã»ã³ããã
- 䟿å©ãªãªã³ã¯
Kaspersky Labãªãã£ã¹ã§ã®äŒè°ã®å 容ã«ç§»ãåã«ãã¢ããªã±ãŒã·ã§ã³ãã¢ãžã¥ãŒã«ã«åå²ããããã®modãã©ãããæ¥ãã®ããæãåºããŠã¿ãŸãããïŒä»¥äžãã¢ãžã¥ãŒã«ã¯ç¹ã«æèšããªãéããDaggerã§ã¯ãªãGradleã¢ãžã¥ãŒã«ã§ãïŒã
ãã«ãã¢ãžã¥ãŒã«ã®ãããã¯ã¯ãé·å¹Žã«ããã£ãŠAndroidã³ãã¥ããã£ã®é ã®äžã«ãããŸããã åºæ¬çãªãã®ã®1ã€ã¯ãæšå¹Žã®ãµã³ã¯ãããã«ãã«ã¯ãã¢ããŠã¹ãã§ã®ããã¹ã»ãã¯ãªããã«ããå ±åãšèããããšãã§ããŸãã 圌ã¯ãé·ãéã·ã³ã¯ã©ã€ã¢ã³ãã§ã¯ãªããªã£ãŠããã¢ããªã·ãã¯ã¢ããªã±ãŒã·ã§ã³ãããã«ãé床ãäžããããã«ã¢ãžã¥ãŒã«ã«åå²ããããšãææ¡ããŸããã
ã¬ããŒããžã®ãªã³ã¯ïŒ ãã¬ãŒã³ããŒã·ã§ã³ ã ãããª
次ã«ãDaggerã䜿çšããã¢ãžã¥ãŒã«ã®ãªã³ã¯ã«é¢ããYandex.Mapsã®Vladimir Tagakovã«ããã¬ããŒãããããŸããã ãããã£ãŠãä»ã®å€ãã®Yandexã¢ããªã±ãŒã·ã§ã³ã§åå©çšããããã«ãã«ãŒãã®åäžã³ã³ããŒãã³ããå²ãåœãŠãåé¡ã解決ããŸãã
ã¬ããŒããžã®ãªã³ã¯ïŒ ãã¬ãŒã³ããŒã·ã§ã³ ã ãããª
Kaspersky Labããã®åŸåãç¡èŠããŠããŸããã§ããïŒ9æãEvgeni Matsyukã¯Daggerã䜿çšããŠã¢ãžã¥ãŒã«ãæ¥ç¶ããåæã«ãã«ãã¢ãžã¥ãŒã«ã¢ãŒããã¯ãã£ãæ°Žå¹³ã«æ§ç¯ããæ¹æ³ã«é¢ããèšäºãæžããŸãããã¯ãªãŒã³ã¢ãŒããã¯ãã£ã®ååã«åŸãããšãå¿ããŸããã§ããã
èšäºãžã®ãªã³ã¯
ãããŠå¬ã®ã¡ããŠã¹ã«ã¯ãäžåºŠã«2ã€ã®å ±åããããŸããã æåã«ãAlexander Blinovããã€ãŸããããDIãšããŠäœ¿çšããHeadHunterã¢ããªã±ãŒã·ã§ã³ã®ãã«ãã¢ãžã¥ã©ãŒæ§ã«ã€ããŠè©±ãããã®çŽåŸã«Artem ZinnatulinãLyftã®800以äžã®ã¢ãžã¥ãŒã«ã®çã¿ã«ã€ããŠè©±ããŸããã Sashaã¯ãã¢ã»ã³ããªã®é床ãäžããã ãã§ãªããã¢ããªã±ãŒã·ã§ã³ã®ã¢ãŒããã¯ãã£ãæ¹åããæ¹æ³ãšããŠããã«ãã¢ãžã¥ã©ãŒæ§ã«ã€ããŠè©±ãå§ããŸããã
ããªããã¬ããŒãïŒ ãã¬ãŒã³ããŒã·ã§ã³ ã ãããª
ãžã³ãããªã³ã¬ããŒãïŒ ãããª
ãªãå顧ããèšäºãå§ããã®ã§ããïŒ ç¬¬äžã«ããã«ãã¢ãžã¥ãŒã«æ§ã«ã€ããŠåããŠèªãã§ããå Žåããããã¯ãããããç 究ããã®ã«åœ¹ç«ã¡ãŸãã 2çªç®ã«ãç§ãã¡ã®äŒè°ã§ã®æåã®ã¹ããŒãã¯ãStream瀟ã®Alexey Kalaidaã«ãããããã¬ãŒã³ããŒã·ã§ã³ã§å§ãŸããŸãããããã¯ãZhenyaã®èšäºã«åºã¥ããŠã¢ããªã±ãŒã·ã§ã³ãã¢ãžã¥ãŒã«ã«åå²ããæ¹æ³ã瀺ããŸããã
ãã®ã¢ãããŒãã®äž»ãªæ©èœã¯ãUIãžã®ãã€ã³ãã§ãããåã¢ãžã¥ãŒã«ã¯åå¥ã®ç»é¢ãšããŠæ¥ç¶ãããŸã-FragmentManagerãå«ãã¡ã€ã³ã¢ããªã¢ãžã¥ãŒã«ããäŸåé¢ä¿ã転éããããã©ã°ã¡ã³ãã æåã«ãååã¯ãããã·ã€ã³ãžã§ã¯ã¿ãŒãä»ããŠãã«ãã¢ãžã¥ã©ãå®è£ ããããšããŸãããããã¯Zhenyaãèšäºã§ææ¡ãããã®ã§ãã ãããããã®ã¢ãããŒãã¯å§åçã§ãããããæ©èœãå¥ã®æ©èœã«äŸåããããã«3çªç®ã®æ©èœã«äŸåãããšããåé¡ããã£ããããåæ©èœã¢ãžã¥ãŒã«ã«ãããã·ã€ã³ãžã§ã¯ã¿ãŒãèšè¿°ããå¿ èŠããããŸããã UIã³ã³ããŒãã³ãã«åºã¥ãã¢ãããŒãã«ãããã€ã³ãžã§ã¯ã¿ãŒãèšè¿°ããã«ãã¿ãŒã²ãããã©ã°ã¡ã³ãã®äŸåé¢ä¿ã¬ãã«ã§äŸåé¢ä¿ãèš±å¯ã§ããŸãã
ãã®å®è£ ã®äž»ãªå¶éïŒãã£ãŒãã£ãŒã¯ãã©ã°ã¡ã³ãïŒãŸãã¯å¥ã®ãã¥ãŒïŒã§ãªããã°ãªããŸããã ãã¹ãããããã©ã°ã¡ã³ããååšããããã倧ããªå®åæãäœæãããŸãã æ©èœãä»ã®æ©èœãå®è£ ããå ŽåãäŸåãããã«è¿œå ããå¿ èŠããããŸããããã¯ãã³ã³ãã€ã«æã«Daggerããã§ãã¯ããŸãã ãã®ãããªæ©èœãå€æ°ããå ŽåãäŸåé¢ä¿ã°ã©ãããªã³ã¯ãããšãã«åé¡ãçºçããŸãã
ã¢ã¬ã¯ã»ã€ã®å ±åã®åŸãã¢ã¬ã¯ãµã³ããŒã»ããªãããçºèšããŸããã 圌ã®æèŠã§ã¯ãUIã«é¢é£ä»ããããå®è£ ã¯ãFlutterã®DIã³ã³ããã«é©ããŠããŸãã ãã®åŸããã£ã¹ã«ãã·ã§ã³ã¯HeadHunterã®ãã«ãã¢ãžã¥ãŒã«ãã£ã¹ã«ãã·ã§ã³ã«åãæ¿ãããŸããã ã¢ãžã¥ãŒã«ã«åå²ããç®çã¯ãæ©èœãã¢ãŒããã¯ãã£çã«åé¢ããã¢ã»ã³ããªé床ãäžããå¯èœæ§ã§ããã
ã¢ãžã¥ãŒã«ã«åå²ããåã«ãæºåããããšãéèŠã§ãã ãŸããäŸåé¢ä¿ã°ã©ããäœæã§ããŸã-ããšãã°ããã®ãããªããŒã«ã䜿çšããŸã ã ããã«ãããæå°æ°ã®äŸåé¢ä¿ãæã€ã³ã³ããŒãã³ããèå¥ããäžèŠãªã³ã³ããŒãã³ããåé€ã§ããŸãïŒãã§ããïŒã ãã®åŸã®ã¿ãæãæ¥ç¶ãããŠããªãã³ã³ããŒãã³ããã¢ãžã¥ãŒã«ã«éžæã§ããŸãã
ã¢ã¬ã¯ãµã³ããŒã¯ã圌ãã¡ããŠã¹ã§ãã£ãšè©³ãã話ããäž»ãªãã€ã³ããæãåºããã ã¢ãŒããã¯ãã£ãèæ ®ããªããã°ãªããªãè€éãªã¿ã¹ã¯ã®1ã€ã¯ãã¢ããªã±ãŒã·ã§ã³å ã®ããŸããŸãªå Žæããåäžã®ã¢ãžã¥ãŒã«ãåå©çšããããšã§ãã hhã¢ããªã±ãŒã·ã§ã³ã䜿çšããäŸã§ã¯ãããã¯åéã¢ãžã¥ãŒã«ã§ããããŠãŒã¶ãŒããã®æ¬ å¡ã®ããã«éä¿¡ããå±¥æŽæžã«ã¢ã¯ã»ã¹ãããšãã«ã空åžãªã¹ãã¢ãžã¥ãŒã«ïŒVacanciesListïŒãšåŠå®å¿çã¢ãžã¥ãŒã«ïŒããŽã·ãšãŒã·ã§ã³ïŒã®äž¡æ¹ã«ã¢ã¯ã»ã¹ã§ããå¿ èŠããããŸãã æ確ã«ããããã«ããµãŒã·ã£ãããªãããã£ãŒãã«æããçµµãæãçŽããŸããã
åã¢ãžã¥ãŒã«ã«ã¯2ã€ã®äž»èŠãªãšã³ãã£ãã£ãå«ãŸããŠããŸããäŸåé¢ä¿-ãã®ã¢ãžã¥ãŒã«ã«å¿ èŠãªäŸåé¢ä¿ãšAPI-ã¢ãžã¥ãŒã«ãä»ã®ã¢ãžã¥ãŒã«ã«å€éšããæäŸããã¡ãœããã§ãã ã¢ãžã¥ãŒã«éã®éä¿¡ã¯ã¡ãã£ãšãŒã¿ãŒã«ãã£ãŠå®è¡ãããŸããã¡ãã£ãšãŒã¿ãŒã¯ã¡ã€ã³ã¢ããªã¢ãžã¥ãŒã«ã®ãã©ãããªæ§é ã§ãã åæ©èœã«ã¯1ã€ã®ããã¯ããããŸãã ã¡ãã£ãšãŒã¿ãŒèªäœã¯ããããžã§ã¯ãã®appã¢ãžã¥ãŒã«ã®ç¹å®ã®MediatorManagerã«å«ãŸããŠããŸãã ã³ãŒãã§ã¯ã次ã®ããã«ãªããŸãã
object MediatorManager { val chatMediator: ChatMediator by lazy { ChatMediator() } val someMediator: ... } class TechSupportMediator { fun provideComponent(): SuppportComponent { val deps = object : SuppportComponentDependencies { override fun getInternalChat{ MediatorManager.rootMediator.api.openInternalChat() } } } } class SuppportComponent(val dependencies) { val api: SupportComponentApi = ... init { SupportDI.keeper.installComponent(this) } } interface SuppportComponentDependencies { fun getSmth() fun close() { scopeHolder.destroyCoordinator < -ref count } }
Alexanderã¯éããªããAndroid Studioã§ã¢ãžã¥ãŒã«ãäœæããããã®ãã©ã°ã€ã³ãå ¬éããããšãçŽæããŸãããããã¯ãäŒç€Ÿã§ã®ã³ããŒãšè²Œãä»ãããªããããã«äœ¿çšãããã³ã³ãœãŒã«ã®ãã«ãã¢ãžã¥ãŒã«ãããžã§ã¯ãã®äŸã§ãã
hhã¢ããªã±ãŒã·ã§ã³ã¢ãžã¥ãŒã«åé¢ã®çŸåšã®çµæã«é¢ããããã€ãã®äºå®ïŒ
- ã83ã®æ©èœã¢ãžã¥ãŒã«ã
- A / Bãã¹ããå®æœããã«ã¯ãã¡ãã£ãšãŒã¿ãŒã¬ãã«ã§æ©èœãæ©èœã¢ãžã¥ãŒã«ã«å®å šã«çœ®ãæããããšãã§ããŸãã
- Gradle Scanã®ã°ã©ãã¯ãã¢ãžã¥ãŒã«ã䞊åã«ã³ã³ãã€ã«ããåŸãã¢ããªã±ãŒã·ã§ã³ã®ããã·ã³ã°ã®ããªãé·ãããã»ã¹ãçºçããããšã瀺ããŠããŸãïŒãã®å Žåã2ã€ïŒæ±è·è
ãšéçšè
åãïŒã
以äžã¯ãã¢ã¬ããµã³ããŒããåºãåãããã£ã³ã³ããããŠã©ãžããŒã«ãåããŸããã
ãã«ãã¢ãžã¥ãŒã«ã¢ãŒããã¯ãã£ã®ã¹ããŒã ã¯æ¬¡ã®ããã«ãªããŸãã
ã¢ãžã¥ãŒã«ã¯ãæ©èœã¢ãžã¥ãŒã«ãšãã¡ã€ã³ã¢ãžã¥ãŒã«ã®2ã€ã®ã«ããŽãªã«åé¡ãããŸãã
æ©èœã¢ãžã¥ãŒã«ã«ã¯ãããžãã¹ããžãã¯ãšUIæ©èœãå«ãŸããŠããŸãã ãã¡ã€ã³ã¢ãžã¥ãŒã«ã«äŸåããŠããŸãããçžäºã«äŸåããããšã¯ã§ããŸããã
ãã¡ã€ã³ã¢ãžã¥ãŒã«ã«ã¯ãããŒã¿ãœãŒã¹ãæäœããããã®ã³ãŒããã€ãŸãäžéšã®ã¢ãã«ãDAOïŒããŒã¿ããŒã¹ãæäœããããïŒãAPIïŒãããã¯ãŒã¯ãæäœããããïŒãããã³ãªããžããªïŒAPIãšDAOã®æäœãçµã¿åãããïŒãå«ãŸããŠããŸãã ãã¡ã€ã³ã¢ãžã¥ãŒã«ã¯ãæ©èœã¢ãžã¥ãŒã«ãšã¯ç°ãªããçžäºã«äŸåã§ããŸãã
ãã¡ã€ã³ãšæ©èœã¢ãžã¥ãŒã«éã®æ¥ç¶ã¯å®å šã«æ©èœã¢ãžã¥ãŒã«å ã§è¡ãããŸãïŒã€ãŸããhhã®çšèªã§ã¯ããã¡ã€ã³ã¢ãžã¥ãŒã«ã®äŸåé¢ä¿ãšAPIäŸåé¢ä¿ã¯ãã¡ãã£ãšãŒã¿ãŒãªã©ã®è¿œå ãšã³ãã£ãã£ã䜿çšããã«ããããã䜿çšããæ©èœã¢ãžã¥ãŒã«ã§å®å šã«è§£æ±ºãããŸãïŒã
ããã«ç¶ããŠäžé£ã®è³ªåããããŸããããããã§ã¯ã»ãšãã©å€æŽããã«ã質å-åçã圢åŒã§èª¬æããŸãã
-èªèšŒã¯ã©ã®ããã«è¡ãããŸããïŒ ãã£ãŒãã£ã¢ãžã¥ãŒã«ã«ã©ã®ããã«ãã©ãã°ããŸããïŒ
-ã¢ããªã±ãŒã·ã§ã³ã®ã»ãšãã©ãã¹ãŠã®ã¢ã¯ã·ã§ã³ã¯èš±å¯ããããŸãŒã³ã§è¡ããããããåœç€Ÿã®æ©èœã¯èš±å¯ã«äŸåããŸããã
-æªäœ¿çšã®ã³ã³ããŒãã³ãã远跡ããã³ã¯ãªãŒãã³ã°ããæ¹æ³
-InjectorRefCountïŒWeakHashMapãéããŠå®è£ ïŒãªã©ã®ãšã³ãã£ãã£ãããããã®ã³ã³ããŒãã³ãã䜿çšããŠæåŸã®ã¢ã¯ãã£ããã£ïŒãŸãã¯ãã©ã°ã¡ã³ãïŒãåé€ãããšããããåé€ããŸãã
-ãã¯ãªãŒã³ãªãã¹ãã£ã³ãšãã«ãæéã®æž¬å®æ¹æ³ ãã£ãã·ã¥ããªã³ã«ãªã£ãŠããå ŽåãããªãããŒãã£ãªã¹ãã£ã³ãååŸãããŸãã
-Gradle CacheïŒgradle.propertiesã®org.gradle.cachingïŒãç¡å¹ã«ã§ããŸãã
-ãããã°ã¢ãŒãã§ãã¹ãŠã®ã¢ãžã¥ãŒã«ãããŠããããã¹ããå®è¡ããæ¹æ³ gradleãã¹ãã ããå®è¡ãããšããã¹ãŠã®ãã¬ãŒããŒãšbuildTypeã®ãã¹ãããã«ãããŸãã
ïŒãã®è³ªåã¯ãäŒè°ã®å€ãã®åå è ã®è°è«ãåŒãèµ·ãããŸãããïŒ
-testDebugãå®è¡ããŠã¿ãŠãã ããã
-ãããã°æ§æã®ãªãã¢ãžã¥ãŒã«ã¯åŒ·åãããŸããã éå§ãå€ããããå°ãªãããŸãã
-ãã®ãããªã¢ãžã¥ãŒã«ã®testDebugããªãŒããŒã©ã€ãããGradleã¿ã¹ã¯ãäœæããããã¢ãžã¥ãŒã«build.gradleã§åœã®ãããã°æ§æãäœæã§ããŸãã
-ãã®ã¢ãããŒãã¯æ¬¡ã®ããã«å®è£ ã§ããŸãã
withAndroidPlugin(project) { _, applicationExtension -> applicationExtension.testVariants.all { testVariant -> val testVariantSuffix = testVariant.testedVariant.name.capitalize() } } val task = project.tasks.register < SomeTask > ( "doSomeTask", SomeTask::class.java ) { task.dependsOn("${project.path}:taskName$testVariantSuffix") }
次ã®å³èã®ãã¬ãŒã³ããŒã·ã§ã³ã¯ãAvitoã®Evgeny KrivobokovãšMikhail Yudinã«ãã£ãŠè¡ãããŸããã
圌ãã¯ãã€ã³ããããã䜿çšããŠã¹ããŒãªãŒãèŠèŠåããŸããã
çŸåšãå瀟ã®ãããžã§ã¯ãã«ã¯300以äžã®ã¢ãžã¥ãŒã«ããããã³ãŒãããŒã¹ã®97ïŒ ã¯Kotlinã§èšè¿°ãããŠããŸãã ã¢ãžã¥ãŒã«ãžã®åé¡ã®äž»ãªç®çã¯ããããžã§ã¯ãã®çµã¿ç«ãŠãå éããããšã§ããã ã¢ãžã¥ãŒã«ãžã®åé¡ã¯åŸã ã«è¡ãããæãäŸå床ã®äœãã³ãŒãéšåãã¢ãžã¥ãŒã«ã«éžæãããŸããã ãããè¡ãããã«ã圱é¿åæã®ããã«ã°ã©ãå ã®ãœãŒã¹ã³ãŒãã®äŸåé¢ä¿ãããŒã¯ããããŒã«ãéçºãããŸããïŒ Avitoã®åœ±é¿åæã«é¢ããã¬ããŒã ïŒã
ãã®ããŒã«ã䜿çšãããšãä»ã®ã¢ãžã¥ãŒã«ãæ©èœã¢ãžã¥ãŒã«ã«äŸåã§ããªãããã«ãæ©èœã¢ãžã¥ãŒã«ãæçµãšããŠããŒã¯ã§ããŸãã ãã®ããããã£ã¯ã圱é¿åæäžã«ãã§ãã¯ãããã¢ãžã¥ãŒã«ãæ åœããããŒã ãšã®æ瀺çãªäŸåé¢ä¿ããã³åæã®æ瀺ãæäŸããŸãã æ§ç¯ãããã°ã©ãã«åºã¥ããŠã圱é¿ãåããã³ãŒãã®åäœãã¹ããå®è¡ããããã«ãå€æŽã®ååžããã§ãã¯ãããŸãã
å瀟ã¯ã¢ããªããžããªã䜿çšããŠããŸãããAndroidãœãŒã¹ã®ã¿ã«äœ¿çšããŠããŸãã ä»ã®ãã©ãããã©ãŒã ã®ã³ãŒãã¯å¥ã ã«ååšããŸãã
Gradleã¯ãããžã§ã¯ãã®ãã«ãã«äœ¿çšãããŸãïŒååã¯ãã§ã«ã BuckãBazelã®ãããªãã«ãã¢ãžã¥ãŒã«ãããžã§ã¯ãã«é©ããã³ã¬ã¯ã¿ãŒã«ã€ããŠèããŠããŸãïŒã 圌ãã¯ãã§ã«Kotlin DSLãè©ŠããGradleãšãããžã§ã¯ãã§ç°ãªãããŒãžã§ã³ã®KotlinããµããŒãããã®ã¯äžäŸ¿ã§ãããããGradleã¹ã¯ãªããã§Groovyã«æ»ããŸãããäžè¬çãªããžãã¯ã¯ãã©ã°ã€ã³ã«çµã¿èŸŒãŸããŠããŸãã
Gradleã¯ãã¿ã¹ã¯ããã£ãã·ã¥ã䞊ååã§ããABIãå€æŽãããŠããªãå Žåã¯ãã€ããªäŸåé¢ä¿ãåã³ã³ãã€ã«ããªãããããã«ãã¢ãžã¥ãŒã«ãããžã§ã¯ãã®ã¢ã»ã³ããªãé«éåã§ããŸãã ããå¹ççãªãã£ãã·ã³ã°ã®ããã«ãMainfraimerããã³ããã€ãã®èªå·±èšè¿°åãœãªã¥ãŒã·ã§ã³ã䜿çšãããŸãã
- ãã©ã³ããããã©ã³ãã«åãæ¿ãããšãGitã¯ãã£ãã·ã¥ãå£ã空ã®ãã©ã«ããŒãæ®ãå ŽåããããŸãïŒ Gradle issueïŒ2463 ïŒã ãããã£ãŠãGitããã¯ã䜿çšããŠæåã§åé€ãããŸãã
- éçºè ã®ãã·ã³ã®ç°å¢ãå¶åŸ¡ããªãå Žåãç°ãªãããŒãžã§ã³ã®Android SDKããã³ãã®ä»ã®ãã©ã¡ãŒã¿ãŒã«ãããã£ãã·ã¥ãäœäžããå¯èœæ§ããããŸãã ãããžã§ã¯ãã®ãã«ãäžã«ãã¹ã¯ãªããã¯ç°å¢ãã©ã¡ãŒã¿ãŒãäºæ³ããããã®ãšæ¯èŒããŸããééã£ãããŒãžã§ã³ãŸãã¯ãã©ã¡ãŒã¿ãŒãã€ã³ã¹ããŒã«ãããŠããå Žåããã«ãã¯ãããããããŸãã
- åæã¯ããªã³/ãªããã©ã¡ãŒã¿ãšç°å¢ã§è¡ãããŸãã ããã¯ãéçºè ãç£èŠããã³æ¯æŽããããã®ãã®ã§ãã
- ãã«ããšã©ãŒãåæã«éä¿¡ãããŸãã æ¢ç¥ã®äžè¬çãªåé¡ã¯ããœãªã¥ãŒã·ã§ã³ã®ããç¹å¥ãªããŒãžã«å ¥åãããŸãã
ããããã¹ãŠã«ãããCIã§15ïŒ ãããŒã«ã«ã§60-80ïŒ ã®ãã£ãã·ã¥ãã¹ãéæã§ããŸãã
次ã®Gradleã®ãã³ãã¯ããããžã§ã¯ãã«å€æ°ã®ã¢ãžã¥ãŒã«ã衚瀺ãããå Žåã«ã圹ç«ã¡ãŸãã
- IDEãã©ã°ãä»ããŠã¢ãžã¥ãŒã«ãç¡å¹ã«ããã®ã¯äžäŸ¿ã§ã;ãããã®ãã©ã°ã¯ãªã»ããã§ããŸãã ãããã£ãŠãã¢ãžã¥ãŒã«ã¯settings.gradleã«ãã£ãŠç¡å¹ã«ãªããŸãã
- ã¹ã¿ãžãª3.3.1ã«ã¯ãããããžã§ã¯ãã«è€æ°ã®ã¢ãžã¥ãŒã«ãããå ŽåãGradleåæã§ãœãŒã¹çæãã¹ãããããããã§ãã¯ããã¯ã¹ããããŸãã ããã©ã«ãã§ã¯ãªãã«ãªã£ãŠããŸããããªã³ã«ããããšããå§ãããŸãã
- äŸåé¢ä¿ã¯buildSrcã«æžã蟌ãŸãããã¹ãŠã®ã¢ãžã¥ãŒã«ã§åå©çšãããŸãã å¥ã®ãªãã·ã§ã³ã¯Plugins DSLã§ããããã©ã°ã€ã³ã®ã¢ããªã±ãŒã·ã§ã³ãå¥ã®ãã¡ã€ã«ã«å ¥ããããšã¯ã§ããŸããã
ç§ãã¡ã®äŒè°ã¯ãã¬ããŒãã®ã¯ãªãã¯ãã€ãã¿ã€ãã«ãPRã®ã¢ã»ã³ããªã40åãã4ã«æžããæ¹æ³ãã§Tinkoffã®Vladimirã§çµãããŸããã å®éãç§ãã¡ã¯gradleãã©ã°ã®éå§ã®é åžã«ã€ããŠè©±ããŠããŸããïŒapkãã«ãããã¹ããããã³éçã¢ãã©ã€ã¶ãŒã
æåã¯ãåãã«ãªã¯ãšã¹ãã®æ åœè ãéç解æãå®è¡ããã¢ã»ã³ããªãšãã¹ããçŽæ¥å®è¡ããŸããã ãã®ããã»ã¹ã«ã¯40åããããŸãããããã®ãã¡ãªã³ããšSonarQubeã ãã25åããããæã¡äžãã®7ïŒ ããèœã¡ãŸããã§ããã
ãããã£ãŠã2æéããšã«ã¹ã±ãžã¥ãŒã«ã§å®è¡ããããšã©ãŒãçºçããå Žåã«Slackã«ã¡ãã»ãŒãžãéä¿¡ããå¥ã®ãžã§ãã«èµ·åãé 眮ããããšã決å®ãããŸããã
å察ã®ç¶æ³ã¯Detectã§ãã ã»ãŒçµ¶ãéãªãã¯ã©ãã·ã¥ãããããäºåã®äºåããã·ã¥ãã§ãã¯ãè¡ãããŸããã
ãããã£ãŠããã«ãªã¯ãšã¹ãã®æ€èšŒã§ã¯ãapkã¢ã»ã³ããªãšåäœãã¹ãã®ã¿ãæ®ããŸããã ãã¹ãã¯å®è¡åã«ãœãŒã¹ãã³ã³ãã€ã«ããŸããããªãœãŒã¹ãåéããŸããã ãªãœãŒã¹ã®ããŒãžã¯ã»ãŒåžžã«æåãããããapkã¢ã»ã³ããªèªäœãç Žæ£ãããŸããã
ãã®çµæããã«ãªã¯ãšã¹ãã«ã¯åäœãã¹ãã®èµ·åã®ã¿ãæ®ããæå®ããã4åãéæããããšãã§ããŸããã ãã«ãapkã¯ãdevã®ããŒãžãã«ãªã¯ãšã¹ãã§å®è¡ãããŸãã
äŒè°ã¯ã»ãŒ4æéç¶ãããšããäºå®ã«ããããããããã«ãã¢ãžã¥ãŒã«ãããžã§ã¯ãã§ããã²ãŒã·ã§ã³ãæŽçãããšããé£é¡ãè°è«ããããšãã§ããŸããã§ããã ããããããã¯ã次ã®ã«ã¹ãã«ã¹ããŒã¢ãã€ã«ããŒã¯ã®ãããã¯ã§ãã ããã«ãåå è ã¯ãã®åœ¢åŒãæ¬åœã«æ°ã«å ¥ã£ãŠããŸããã ã¢ã³ã±ãŒããŸãã¯ã³ã¡ã³ãã§è©±ãããããšãæããŠãã ããã
ãããŠæåŸã«ãåããã£ããããã®äŸ¿å©ãªãªã³ã¯ïŒ