Kotlin Fest 2018 ã«è¡ã£ã¦ãã¾ãã
çãããä¹
ãã¶ãã§ã. å
æ¥éå¬ãããKotlin Fest 2018ã«è¡ã£ã¦ããã®ã§åå¿é²ãå
¼ãã¦ã¾ã¨ãã¾ã.
ãã¿ãã¿ãã¦ãããªããªãåã«æ¥ãã§æ¸ãã®ã§ã...!
ç®æ¬¡
- åå ããçç±
- ä¼å ´ã®é°å²æ°
- ãªã¼ããã³ã°ã»ãã·ã§ã³
- ãã¼ã¹ã§ã®åºæ¥äº
- èããã»ãã·ã§ã³
- æ親ä¼
- ã¾ã¨ã
åå ããçç±
ããããKotlin Fest 2018ã«åå ãããã¨æã£ãçµç·¯ã¯2ã¤ããã¾ã. æè¿ããAndroidã®ã¢ããªã±ã¼ã·ã§ã³ä½æã«é¢ããã®ã§ãã, JavaãããKotlinãå¢ãã¦ãã¦ããã¨ããç¶æ³ã§ãã.ãã¤ããã¤ã³ã¿ã¼ã³ãªã©ã§Androidã«é¢ããã¨ãã®ã»ã¨ãã©ãKotlin(ãããã¯ã³ã³ãã¼ãä¸)ã¨ãªã£ã¦ãããã¨ãããï¼èªåã§ä½æãããã®ãªã©ã§ãKotlinãæ¡ç¨ãããªã©, èªåã®Kotlin使ç¨çãä¸ãã£ã¦ããä¸,ãã£ã¨Kotlinã®ãã¨ãç¥ããããªã¨æãããã«ãªã£ã¦ãã¾ãã. ãããªä¸8æä¸ã¤ã³ã¿ã¼ã³ã¨ãã¦ãä¸è©±ã«ãªã£ã¦ããMercariããã«æå¾ ãã¦ããã ããã¨ãããã¨ã§åå ã決ã¾ã£ãããã§ã. ãã±ãããé ããMercariããã«ã¯å§åçæè¬ããããã¾ãã. ã¤ã³ã¿ã¼ã³ã«ã¤ãã¦ã¯ã¾ãå¾æ¥çµäºå¾ã«ã¾ã¨ãããã¨æãã¾ã.
ä¼å ´ã®é°å²æ°
ä¼å ´ã§ããæ±äº¬ã³ã³ãã¡ã¬ã³ã¹ã»ã³ã¿ã¼ã¯åå·ã«ãã, é§ ããå¾æ©ä¸åã®å¥½ç«å°ã«ããã¾ã.ãé常ã«è±ªè¯ãããªä¼å ´ã«å°çããã¨ãããã§ã«ãã¼ã¹ãè³ãã£ã¦ãã¾ãã.
åä»ããã¾ã, ããã«ãã£ã®ãã¼ãããã¯ãã²ãã.
åãã¼ã¹ã§ã¯ã¹ãã³ãµã¼æ§ãæ§ã ãªå±ç¤ºãè¡ã£ã¦ãã¾ãã.
ãªã¼ããã³ã°ã»ãã·ã§ã³
éä¼å¾æåã®ã»ãã·ã§ã³ã¯ãªã¼ããã³ã°ã»ãã·ã§ã³ã¨ãããã¨ã§kotlinã¨ã´ã¡ã³ã¸ã§ãªã¹ãã®é·æ¾¤å¤ªéãã(@ngsw_taro)è¤åèãã(@satorufujiwara)ã®ã話ã§ãã.
è¦ç´
- Kotlinã³ãã¥ããã¤ã«ã¤ãã¦
- ã³ãã¥ããã£ã¯çãç©
- ã¿ããªã§çãä¸ãã¦ããã¾ããã
- Kotlinä»æç©èª
- 2011å¹´ã®çºè¡¨ããä»ã«è³ãã¾ã§
- ãã¤ã«ã¹ãã¼ã³ã¨ããå½¢ã§é次ãªãªã¼ã¹
- æ£å¼ãªãªã¼ã¹ãJS, Kotlin Nativeãªã©
- ããããã³ã«ã¼ãã³ãæ£å¼ã«?
- Kotlin Fest 2018ã®ãã¼ã
- Embracing Kotlin
- Kotlinãã¿ããªã§æã§ã¾ããã
- Kotlinã®å²å¦
- å®ç¨ä¸»ç¾©
- ç°¡æ½
- å®å ¨
- ç¸äºéç¨æ§
- Kotlinã®ãªã½ã¼ã¹
ææ³
Kotlinã®åå¼·ä¼ã«åå ããã®ã¯åãã¦ã ã£ãã®ã§ãã, æ°åã«ãé常ã«å ¥ããããã³ãã¥ããã£ã®ç©ºæ°ãæãã¾ãã. ããã¦ä½ãããã¿ããªKotlinãæã§ããã¦ãã¾ããªãï¼ã¨ããæããé常ã«ããã£ãã§ã. ãã¨ãã¨ç§ã¯C#ã¯ãããã¨è¨ãç¶ãã¦ãã人éãªã®ã§ãã,Kotlinãæã§ã¦ãããããªã¨æããã¦ããããããªãªã¼ããã³ã°ã»ãã·ã§ã³ã§ãã. ã¾ãï¼ãªãã¨ãªããã¥ã¼ããªã¢ã«ã¯ãã£ãã®ã§ãã,KoansãGuidesã®åå¨ã¯ç¥ããªãã£ãã®ã§Kotlinã®2æ©ç®3æ©ç®ããããåºããã¨ãã¦ãã人ã«ãé常ã«æçãªæ å ±ãè©°ã¾ã£ã¦ããã®ã§ã¯ãªãã§ãããã.
ãã¼ã¹ã§ã®åºæ¥äº
ã»ãã·ã§ã³ã®åéã«ã¯ã¹ãã³ãµã¼ã®ãã¼ã¹ã§æ§ã ãªå±ç¤ºãããã¦ãã¾ãã. ç¹å¾´çã ã£ãã®ã¯Kotlin Codeã®åé¡ãåºãã¦ããã¼ã¹ãå¤ãã£ããã¨ã§ã. ã©ããé常ã«é£ããKotlinã®ãã¨ãæã§ã¦ããªãã¨è§£ããªããããªæã«æº¢ããåé¡ã§ãã.
åé¡ã«ææ¦ããã, æ½é¸ãããã¨è²ã ãã¦ãããã¡ã«ãã£ã¨ããéã«æéã¯ã»ãã·ã§ã³ã®æéã«ãªã£ã¦ãã¾ãã¾ãã.
yahooããã®æ½é¸å½ããã¾ããï¼
— ã¿ãã (@m1zyuk1) 2018å¹´8æ25æ¥
ããã¯èªããããªã#KotlinFest pic.twitter.com/6KLCCVXayh
ã¹ããã«ã¼ã ï¼#KotlinFest pic.twitter.com/qrq67ni8hO
— ã¿ãã (@m1zyuk1) 2018å¹´8æ25æ¥
m3ããã®ãã¼ã¹ã§ããã ãã¾ããï¼#KotlinFest pic.twitter.com/8mwrLjnIZ4
— ã¿ãã (@m1zyuk1) 2018å¹´8æ25æ¥
èãã¦ããã»ãã·ã§ã³
ä¼å ´ã§ã¯å¤§ããªé¨å±ã2ã¤ã«ä»åã£ã¦åæã«2ã¤ã®ã»ãã·ã§ã³ã並è¡ããã¦ãã¾ãã. ãªã®ã§èªåãèããã¨ãã§ããã»ãã·ã§ã³ã¨ãã®å 容ã»ææ³ãç°¡åã«ã¾ã¨ãããã¨æãã¾ã.
Kotlinã§æ¹åããAndroidã¢ããªã®å質@yanzmãã
è¦ç´
- å質ã®è©±ãããçç±
- åãã¦ããã¢ããªã®ç§»è¡ã¯é£ãã
- æ¸ãç´ã
- ãã°ã¬
- ã³ã¹ãããªã¹ã¯ãä¸åãå¹æã¯ããã®ã
- åãã¦ããã¢ããªã®ç§»è¡ã¯é£ãã
- ã¢ããªã®å質ã¨ã¯
- å¤çå質è¦å : ã¢ããªã«ãã®æ§è³ªãããããªããã¦ã¼ã¶ãèªèã§ãã
- æ£ç¢ºã
- é ä¸ã
- æ¡å¼µæ§
- åå©ç¨æ§
- å
çå質è¦å : ã¢ã¸ã¥ã¼ã«æ§ãèªã¿ããããªã©ãããããã¼å´ããè¦ãã¨ãã«å¤§äºãªå質
- èªã¿ããã
- å¤çå質è¦å : ã¢ããªã«ãã®æ§è³ªãããããªããã¦ã¼ã¶ãèªèã§ãã
- Kotlinã«Javaã®è¦åãé©ç¨ãã¦ã¿ã
- é常ã«ããããªäºä¾ããã
- è²ã ãªãã¿ã¼ã³ã«ããã¦Javaã®è¦åãè¨èªä»æ§ã§å¯¾å¿ãã¦ãã
- é·ãçã延ã³ã¦ããã¢ããªã¯ãã®å ãçã延ã³ã確çãé«ãã®ã§ãã¡ãã¨Kotlinã«ä¹ãæãã¦ããã¾ããã
ææ³
Kotlinã¨ããè¨èªãæã¤ä»æ§ã«ãã£ã¦Javaã§å®è£ ããã¦ããã³ã¼ãã§æ°ãã¤ããã¹ãç¹ãããå®æã«éæãããã®ã§Kotlinãã©ãã©ã使ã£ã¦ããã¾ãããã¨ããã話ã§ãã. Kotlinåå¦è ã®ç§ã¨ãã¦ã¯ãããªä»æ§ããã£ãã®ãï¼ã¨ããé©ãã, ãªããããªæ¸ãæ¹ããã¦ããã®ãè ã«è½ã¡ããã¨è²ã ãªçºè¦ãããã¾ãã. å ·ä½çãªäºä¾ãåãä¸ãã¦ããã¦ãããã,Javaã¨Kotlinã®æ¯è¼ãç®ã«è¦ãããããªã¹ã©ã¤ãã«ãªã£ã¦ããã®ã§é常ããããããã£ãã§ã.äºä¾ã¯çãã ãããã ã£ãã®ã§ããä¸åº¦ã¹ã©ã¤ããè¦ã¦å¾©ç¿ãããã¨æãã¾ã!
Kotlinã¢ããªã®ãªãã¡ã¯ã¿ãªã³ã°ãã¤ã³ã@Naoto Nakazatoãã
è¦ç´
- ããè¯ãKotlinã³ã¼ãã«ãªãã¡ã¯ã¿ãªã³ã°ãããå ´åã®Tips
- Cradle Kotlin DSL
- build.gradleã build.gradle.ktsã«
- é°å²æ°groovyãKotlinã§ãã£ã¡ãæ¸ãã
- å°å
¥ã¿ã¤ãã³ã°
- æ°è¦ã¯æåãã
- æ¢åã¯æéãããã°
- è£å©çãªã¿ã¹ã¯ãå¥ãã¡ã¤ã«ã§è¿½å ããã®ãè¯ã
- å¦çã®å
±éå
- å¦çéè¤ã¯ä¿®æ£ãã¹ãèªçº
- å¦çãå
±éåããã¨ãã®æ¹æ³
- Abstract class
- ç¶æ¿é¨åã§å¦çãå ±éããã
- ã¯ã©ã¹å¤ããå¼ã°ããããªã
- Interface default
- ãã¼ã¹ã¯ã©ã¹ã®è¥å¤§åãé²ããã
- å¤éç¶æ¿ãããã
- Class delegation
- Byã§å®è£ ãå¥ã¯ã©ã¹ã«å§è²ã§ãã
- Property delegation
- ã²ãã¿ã¼ã»ãã¿ã¼ãå¤ã«
- å¤ã®ããã«æ±ãããããªãã®ã«åãã¦ã
- æ¡å¼µé¢æ°
- ã¯ã©ã¹ã«é¢æ°ã追å ãã¦ããããã«è¦ãããã¨ãã§ãã
- å ¬å¼ã§ãããããªååã«ãã¦éãªå®è£ ãããã¨å±ãªã
- æ±ç¨æ§ãä½ããã®ã«é©ç¨ããã®ããããããªã
- ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®ããã©ã«ãå®è£ ã«ããã¨ã¹ã³ã¼ããéå®ããã
- ãããã¬ãã«é¢æ°
- ã©ãããã§ãå¼ã¹ãã®ã§æ³¨æ
- ä¹±ç¨ã«æ°ãã¤ãã¦
- Abstract class
- Mutableãé¿ãã
- ãªãé¿ããã
- å¤ãèããå¿ è¦ã常ã«åºã¦ãã
- æé»ã®åæãå¢ããã°ã®æ¸©åºã«
- smart castãå¹ããªã
- varã¯æ¬å½ã«varã§ããå¿ è¦ãããã
- å¤ã®åãåã
- å¤ã¯ä¸å¤ã§ããã
- å¤ã¯nullableã
- const, val, lazy, lateinit, varã®ä½¿ãåã
- ã©ã®æç¹ã§å¤ãåæåã§ãããã©ããã¨å¯å¤ãã©ããã«çç®ãã
- varã¨mutableã¯ã©ã¡ããåé¿ã§ããã¯ã
- ãªãé¿ããã
- Collection
- Listã¯read onlyã§ãã£ã¦ immutableã§ã¯ãªã
- Listã¯å ±å¤ãMutableã¯ä¸å¤
- çæã¯é©åãªã¯ã©ã¹ãç¨ãããã¨
- Collectionãæ´»ããããªãã¡ã¯ã¿ãªã³ã° : 2ã¤ã®ãªã¹ããåæã«æ±ã
- 対å¿é¢ä¿ã®ãããã¼ã¿ã®ãªã¹ã
- zip
- 2ã¤ãããæãã«ä½¿ãã
- å¤æã¨é¤å¤
- map
- filter
- mapNotNull
- ãªã¹ããåå²
- withIndex
- groupBy
- values
- allã¨anyã¨none
- ç¸äºå¤æå¯è½
- å¦å®ããªãããã«æ¸ãã®ãä¸çªè¯ã
- Collectionã®ã¡ã½ããã¯ç©æ¥µçã«ä½¿ãã¨è¯ããã
- DSL
- Nullablility
- ã©ãã§nullableãå¤æããã
- nullableã®ã¾ã¾ä½¿ã -> è³ãæã§null check
- ç¡å¹ãªãã¼ã¿ãå ¥ãã¦non null -> ãã¼ã¿ãã§ãã¯ãå¢ãã
- nullãä½ã表ãã¦ããããèãã
- æ»
å¤ã«èµ·ããªãã¨ã©ã¼ã±ã¼ã¹
- infraã§exceptionã«
- ä»»æé
ç®
- UIã¾ã§nullableã§
- UIã§æååå¤æ or ãã§ãã¯
- èªæãããªãä½ã
- sealedã¯ã©ã¹ã§æå³ä»ã
- æ»
å¤ã«èµ·ããªãã¨ã©ã¼ã±ã¼ã¹
- Nullã表ããã®ãèããã
- ã©ãã§nullableãå¤æããã
- ã¹ã³ã¼ãé¢æ°
- ãã£ããã£ãã
- Ifã¨ã¨ã«ãã¹
- å¦çãã¾ã¨ãã
- ex) Intentã«å¯¾ãã¦ã®é¢æ°ãã¾ã¨ãã
- ãã¼ã«ã«å¤æ°ãåªå ãªã®ã§æ³¨æ
- Let/elvisã¯if/elseã¨ç価ã§ã¯ãªãã®ã§æ³¨æ
- ã¹ã³ã¼ãå¤å¼ã³åºãæ°ãã¤ãã¦
- ãã£ããã£ãã
- ãã¼ã¿æ§é ã¨ç¶æ
æ°
- è¥å¤§ããã¡
- ããããªãç¶æ
ãé¿ãã
- ãã°ã®æ¸©åº
- èæ ®ã¯ä¸æ¯
- ã¯ã©ã¹åããã»ã©é¢é£ããã
- Sealed class
- Data classã§ç¶æ ã
- Eitherã¨Pair
- Arrow : é¢æ°åã£ã½ãæ¸ãæ¹ãã§ããããã«ãªãã©ã¤ãã©ãª
- ä¸è¬åããã¨
- ç¶æ æ°ãèãã¦ããå®è£ ã«
- ç¶æ
æ°ã®åæãã
- Kotlinãæ°å¼ã«å¤æ
- æ°å¼ãå±é
- ã¢ãªã¨ãã¤è¡ãåé¤
- æ®ã£ãé ãæ»ã
- é©å®sealed,dataã使ã£ã¦æå³ã¥ãããã
ææ³
1ã¤åã®ã»ãã·ã§ã³ãJava -> Kotlinã®ã話ã ã£ãã®ã«å¯¾ããã®ã»ãã·ã§ã³ã§ã¯Kotlinã³ã¼ãã®ãªãã¡ã¯ã¿ãªã³ã°ããã¼ãã§ãã. èªåããªãã¨ãªãæ¸ããã³ã¼ãã«é©å¿ã§ããããªãªãã¡ã¯ã¿ãªã³ã°ãã¤ã³ããå§ãã¨ãã¦æ§ã ãªTipsãç´¹ä»ããã¦ãã¾ã.æå¾ã®ç¶æ æ°ã«é¢ããåæã¯Kotlinã¯ãã¡ããã®ãã¨ãã以å¤ã®è¨èªãç¨ããã¢ããªã±ã¼ã·ã§ã³éçºã§ãå¿ç¨ã§ãããã§ã. ç§ã¯ã¾ã èªåã®æã£ã¦ããKotlinã³ã¼ããããã¾ã§å¤ããªãã®ã§, ãªãã¡ã¯ã¿ãªã³ã°ãããã«è¡ãããã§ã¯ããã¾ããã, ãã®ç¥èã¯ãªãã¡ã¯ã¿ãªã³ã°ã ãã§ãªãæ®éã«Kotlinãæ¸ãéã«ã使ããã¨æãã®ã§ããã¹ãã¼ããªã³ã¼ããç®æãã®ã«é常ã«æçã ã¨æãã¾ãã.
Kotlin linter@kgmyshinãã
è¦ç´
- ã»ãã·ã§ã³ã®ã´ã¼ã«
- Kotlinç¨ã®linterã®ä½¿ãæ¹ã»ç¹å¾´ãç解
- å種linterã®ã«ã¹ã¿ã ã«ã¼ã«ãä½ããããã«
- Linterãæè¡é¸å®ããå ´åã®ææã«ãªããã¨
- Linterã¨ã¯
- ã½ã¼ã¹ã³ã¼ãåæ
- ãã°ã¨ãæ§æã¨ã©ã¼ã¨ãããããã®ãè¦ã¤ãã¦ãã©ã°ãç«ã¦ã
- AST(Abstract Syntax Tree)ãç¥ã
- ã³ã¼ããã©ã®ãããªããªã¼ã«ãªã£ã¦ããã
- PsiViewerã§ããã
- 大ä½ã®æµã
- installãããã³ãã³ããã使ã
- Custom Ruleã®ä½æ
- ããæ§é ã®ã¨ãã«ã©ãããæ¡ä»¶ã§è¦åãåºãã
- visitã¡ã½ãããå®è£
ãã¦ãã
- ãã¼ãããã度ã«å¼ã°ãã
- providerãä½ã£ã¦ç»é²ãã
- Ktlint
- æ¨æºã«ã¼ã« : 20åå¼±
- åå¥è¨å® : ã§ããªã
- Custom Lint : ä½ãã
- ãã®ä» : formatã§ãã
- detekt
- æ¨æºã«ã¼ã« : ãããã
- åå¥è¨å® : ã§ãã
- Custom Lint : ä½ãã
- ãã®ä» : è¤é度ãããã
- android-lint
- æ¨æºã«ã¼ã« : ãããã
- åå¥è¨å® : ã§ãã
- Custom Lint : ä½ãã
- ãã®ä» : åãè¦ãã(ã¡ã½ããã®è¿ãå¤ãè¦ãã)
ææ³
Kotlinã®Lintã«é¢ããä¸é¢¨å¤ãã£ãã»ãã·ã§ã³ã§ãã. ããLintã«æããã¦ããç§ã§ããããããã©ã®ããã«ãã¦ã³ã¼ãã解æã,è¦åãåºãã¦ããã®ãæ°ã«ãªã£ã¦ããã®ã§ã¡ããã©ããã£ãã§ã. ASTã¨ããæ¦å¿µãããã®è¦æ¹, èªåã§ã«ã¼ã«ãä½æããæ¹æ³ã«ç¾å¨ããLintããããã®ç¹å¾´ã¨é常ã«å¤ãã®ç¥èãæã«å ¥ãã¾ãã. å¾ã®ã»ãã·ã§ã³ã§ããHow to Kontributeã§ãPsiViewerãInspection Pluginã®éçºæã«ä½¿ããã¦ãã,Kotlinã§ã¢ããªãä½ãã®ã§ã¯ãªãKotlinããã使ããããããããã®ãã¼ã«ã«è§¦ãããã¨ãã§ããã®ãããã£ãã¨æãã¾ã.
Kotlin ã³ã«ã¼ãã³ãç解ããã@sys1yagiãã
è¦ç´
- ã³ã«ã¼ãã³ã¨ã¯
- 対çã®ã«ã¼ãã³
- ãäºããå¼ã³åºãã¦å¶å¾¡ã§ãã
- ç¾ä»£ã®Kotlinã®ã³ã«ã¼ãã³
- ä¸æåæ¢å¯è½ãªè¨ç®ã¤ã³ã¹ã¿ã³ã¹
- ã¹ã¬ããã®ããã«å®è¡ããã³ã¼ããããã¯ãæã¤ãã¹ã¬ããã«ã¯æç¸ãããªã
- Futureãpromissã®ããã«å¤ãè¿ããã¨ããã
- æ®æ®µæ¸ãã¦ã
- ã³ã¼ã«ããã¯ãåãåãå½¢ã«ãã¦ããããã³ã°ããªãããã«ãã¦ãã
- ç¶ç¶ç¶æ³ãå¢ãã¦ãåé¡ãªã
- 並åã«ãã©ããã«ããã
- ã³ã«ã¼ãã³ã¯ã©ã®ããã«å®ç¾ããã¦ããã
- Awaitã¯ã©ã®ããã«?
- ã¹ãã¼ããã·ã³ã«å¤æãã¦ã
- ä¸æã¨åéãç¶æ é·ç§»ã¨è¦ç«ã¦ã
- ãã¼ã¿ãã©ãã«ãã¹ãã¼ããã·ã³ã§ä¿æãã¦ãã
- ã©ã®ããã«å¤æãã¦ããã®ã
- suspend修飾åãå°å
¥
- ã©ã ãå¼ã«ã¤ããã¨ã³ã«ã¼ãã³æ¬ä½ã¨ãã¦æ±ã
- é¢æ°ã«ä»ä¸ããã¨ä¸æããå ´æã示ã(ãµã¹ãã³ãé¢æ°)
- ãµã¹ãã³ãé¢æ°ã¯ãµã¹ãã³ãé¢æ°/ã©ã ãããããå¼ã³åºããªã
- suspendã©ã ãã®æ¡å¼µé¢æ°ãç¨æããã¦ãã
- startCorutine
- continuation
- suspend修飾åãå°å
¥
- ã³ã«ã¼ãã³ãã«ãã¼
- ã³ã«ã¼ãã³ãçæãããã«ãã¼
- ç¶ç¶ã¤ã³ã¿ã¼ã»ãã¿ã¼
- å®è¡ã¹ã¬ãããã³ã³ããã¼ã«
- ex launch(intercepter){do something}
- åºæ¬çãªä½¿ãæ¹
- Kotlin 1.1ããç»å ´
- Corutineã¯ã©ã¤ãã©ãªã§æä¾
- ç¹å®ç°å¢åãã®ã©ã¤ãã©ãªã
- experimentalæ
- 1.3ã§stable
- ç°å¢æ§ç¯
- gradleã«implementationã追å
- å種ã³ã«ã¼ãã³
- launch
- çµæãæããªãã³ã«ã¼ãã³ãä½æããã³ã«ã¼ãã³ãã«ãã¼
- å¼æ°
- context(å®è¡ã®ã³ã³ããã¹ããå
±æããããã¼ã¿ãã¤ã³ã¿ã¼ã»ãã¿ã¼ãªã©)
- Default dispatcherãããã©ã«ã
- commonpoolã使ã
- ã¹ã¬ãããã¼ã«ã§åä½ãã
- start(ãã¤èµ·åããã®ã)
- ããã©ã«ãã¯å³åº§ã«å®è¡
- Parent
- 親ã®job
- è¤æ°ã®ã³ã«ã¼ãã³ãä¸æ¬ã§ãã£ã³ã»ã«ã§ãã
- onCompletion
- ã³ã«ã¼ãã³ã®å®äºãã³ã¼ã«ããã¯ã§
- suspendã©ã ã
- context(å®è¡ã®ã³ã³ããã¹ããå
±æããããã¼ã¿ãã¤ã³ã¿ã¼ã»ãã¿ã¼ãªã©)
- æ»ãå¤ï¼job
- ã³ã«ã¼ãã³ã«é¢ä¸ã§ãã
- å¾ ã¡åãã
- ãã£ã³ã»ã«
- ã³ã«ã¼ãã³ã«é¢ä¸ã§ãã
- åºæ¬çã«ã¹ã¬ãããã¼ã«ã§åä½
- progressbarã¨ããããã¨è½ã¡ã
- ã¤ã³ã¿ã¼ã»ãã¿ã¼ã§UIãæå®ããã°UIã¹ã¬ããã§å®è¡
- async
- ããããã³ã°ããæã« async {}.await()
- launchã®éã : çµæãè¿ãã¦ããã
- Differedãè¿ã
- await()ãæã£ã¦ãã¦å¤ãè¿ã
- Differedãè¿ã
- 大ä½launchã¨async/awaitãçµã¿åãããã°äºè¶³ãã
- Try,catchãã§ãã
- ãªã¯ã¨ã¹ããç´åã§
- å ã«asyncã§å®è¡ã ã
- .await()ã®ã¨ããã§å¾ ã¤
- å¾ ã¡åããã®ã¿ã¤ãã³ã°ã§awaitãã
- cancel
- Try catchã¯exceptionã
- èµ·åæã«jobãåã£ã¦ããã°ä»»æã¿ã¤ãã³ã°ã§cancelã§ãã
- ã¾ã¨ãã¦cancel
- 親ãæã£ã¦ããã¦çææã«è¦ªãç»é²ãã
- 親ãcancelããã¨ã¾ã¨ãã¦cancelããã
- ãªãã©ã¤
- Repeatãä¸ã«æãã§ãã
- æåãããreturnã§launchãã®ãã®ãreturn
- 失æããããªãã©ã¤ãã¹ãããã³ããªã³ã°
- ãªãã©ã¤ãã¹ãã§ãªãã£ãããªãã¼ããæãã
- launch
- é¢ç½å®è£
- Retrofitãdefferedã«ãããã¨ã§awaitã§ãã
- EventBusã¨channel
- ã¤ãã³ããçºçããã¨ãã®ã¿åéããã
- onActivityResultãsuspecd
- requestPermissionãããã
- android-corutines
ææ³
ååã¯ç¥ã£ã¦ãããã®ã®ä»ã¾ã§ã»ã¨ãã©ä½¿ã£ããã¨ããªãï¼èª¬æããã¾ãã§ããªãã£ãcoroutinesã®ã»ãã·ã§ã³ã§ãã.
éåæå¦çãè¬ã®æè¡ã§ããæãã«ãããããã«ãã¦ããããã®ããããã®ç解ã ã£ãã®ã,Kotlinã®ã³ã«ã¼ãã³ã¯ã¹ãã¼ããã·ã³ã§éåæå¦çãã¹ã¬ããæå®ãããæãã®ãããã¯ã§ãããæè¡ããï¼ããããã®ç解ã«ãªãã¾ãã. ã¾ã ã¾ã ç解度ã¯çãæ°ããã... coroutinesãã»ã¨ãã©ããã£ã¦ããªãã£ãèªåããããããã«ç解ã§ããé常ã«ããããããã»ãã·ã§ã³ã§ãã.èªåã®ãããã¯ãã§æ©é試ãã¦ã¿ã¦ãã¾ã.coroutinesãã¹ã
How to Kontribute (v4 JP)@shiraji_iãã
è¦ç´
- kontributorãå¢ããã¦ãã
- ã»ããã¢ãã
- JDK 9ãå¿ è¦ or JDK10,JDK1.8,JDK1.7,JDK1.6
- Repository
- fork and clone
- branchãä½æ
- ã¦ãã¼ã¯ãªã®ãã©ã³ãåã§
- ãã¼ã¸ã³ãããããªããããã«
- 追å¾ã®ããã«
- git remote add upstream {forkå ãªãã¸ããª}}
- IDE
- IntelliJ IDEA v2017.3
- Not Android Studio
- IDE plugins
- Preference > build cradle runner check
- Kotlin plugin latest release 1.2.x âï¸
- Tools > Kotlin > configure Kotlin plugin update > check for updates now (stable)
- Module
- Open Kotlin
- Module from existing sources
- build.gradle.ktsãé¸æ
- Use default grade wrapperããã§ãã¯
- è²ã è¦ããããã«ãªã
- Run
- ä»ã®éçºè
ã³ãã¥ãã±ã¼ã·ã§ã³æ¹æ³
- Slack
- slack.kotlinlang.org
#kontributors
- ããã§ã³ã³ããªãã¥ã¼ãã«é¢ãã質å
- å¤ã«è³ªåããã®ããããã(æå·®ã®é½å)
- YoutTrack
- Issueããã¸ã¡ã³ããã¼ã«
- Kotlinã®issue
- youtrack.jetbrains.com/issues/KT
- ä½ãä½ã ãããããªã -> Up-for-grabsã¿ã°ããã£ã«ã¿ã¼ããã¨è¯ã
- åãæããåã«ããã¾ãã¢ãã¼ã«ãã³ã¡ã³ããã
- ã§ããªãããã¨æ¯ããåã«ãã£ã¦ã¿ã¦ãã ããªãã ãã ã£ãã¨ãã¡ãã¨è¨ãã°è¯ã
- GitHub
- PRã®ãã£ã¼ãããã¯ã®ã¿
- Kotlinã§ã®æ©è½éçºã¯YouTrackã§issueãç«ã¦ãå¿
è¦ãã
- ããããè¦ãã¦ãªã
- youtrackã§prã®urlãæããã°è¦ã¦ããã
- Slack
æåã®ããããã³ã³ããªãã¥ã¼ã
- READMEã®ä¿®æ£
- ç°å¢æ§ç¯ãããªã
- ã³ã¼ãæ¸ãããç°¡å
- ããã¥ã¡ã³ããã³ã¡ã³ãã®è¨å
¥
- Standart library docããããã¥ã¡ã³ãããªã
- kdocã§è¨è¿°
- PRããã ã
- ãµã³ãã«ã³ã¼ãã®æä¾
- ex) KT-20357
- OSSåå¿è åãã®issue
- Kotlinã§ã§ãã
- 1ã¤ã®ãµã³ãã«ã®ã¡ã½ãããæ¸ãã ãã§OK
- ã©ãæ¸ãã®ãããããªã人åãã®STEP
- ãµã³ãã«ã³ã¼ãããªãã¡ã½ãããæ¢ã
- ãµã³ãã«ã³ã¼ããæä¾ãããã£ã¦issueã«ã³ã¡ã³ã
- ãµã³ãã«ã³ã¼ãæ¸ã
- Groupbyã®ãµã³ãã«ãæä¾ããã®ã§groupByã¨ããé¢æ°ã
- @Sampleã§æ¸ã
- assertXXã¨ãã使ã£ã¦ åããè¦ãã
- @sampleãæ¸ãã¦å®å ¨å°±è·ã®ã¡ã½ããåãæ¸ã
- ãã¼ã¸ãããã¨æ¸ãããããã«ãªã
- ReadMeããã
- PRãéã
- ã³ã¡ã³ããç·¨éãã¦PRã®ãªã³ã¯ã
- READMEã®ä¿®æ£
å®éã«ãã©ã°ã¤ã³ãä½ã£ã¦è¦ã¾ããã
- Inspectionã®ä½æãå¤ã
- Inspectionã¨ã¯
- ãã®æ¸ãæ¹ããã°å¹¸ãã«ãªãã
- ããããããããããããããã£ã¦è¨ã£ã¦ç´ãã¦ããã奴
- Inspectionã®ä½æ
- 表ç¾ãå¤æãã
- PSI Viewerã使ã
- Lintã®é ã«ãã£ãã³ã¼ãã®æ§é ãè¦ãããã¤
- Tools | View PSI Structure of Current file
- å¾ã§èµ·åãã¦ããã»ãã§
- ãã¤ã©ã¤ãããã¨æ§é ãè¦ãã
- ex) ktValueArgumentãªãããã«å¯¾ãã¦ã®ã³ã¼ããæ¸ã
- ãã¤ã©ã¤ãããã¨æ§é ãè¦ãã
- å¾ã§èµ·åãã¦ããã»ãã§
- abstructkotlininspectionãå®è£
- Psielementvisitor
- ktvisitorã¨ããã®ãvisitorã¯ã©ã¹
- visitArgument(argument: KtValueArgument)
- ããã«æ¸ãã¦ããã°è¯ã
- ktVisitorVoidãæ»ãã³ã¼ãã
- visitArgumentã§printlenãã¦ã¿ã
- plugin.xmlã«èªåã®ãå
¥ãã
- Tagã®è¿½å
- ã¬ãã¼ã対象ãè¦ã¤ãã¦
- ä½ãã¬ãã¼ããããã
- descriptionããã
- inspectionã¯XXãreportããã
- ãã¹ããã¼ã¿ã追å ãã
- ã¤ã³ã¹ãã¯ã·ã§ã³ãã©ã«ãã¼ãä½ã
- .inspectionãã¡ã¤ã«ãä½ã
- TestDataãä½ããã¨ã§ã±ã¼ã¹ã¯ã§ãã
- .ktã¨.kt.after
- å®è¡åã¨å®è¡å¾ã®ãã¼ã¿
- GenerateTestãé¸æãã¦run
- inspectionLocalã§ä»ã¯ãã
- Document
- AbstractInspectionTest/Kotlin
- SendPR
- Commit comment #KT-nnnnn Fixed
- Send PR to master
- issueã«æãã
- è¾æ±å¼·ãå¾
ã¤
- 1é±éã¨ãåå¿ãªãã£ããslackã§
ææ³
Kotlinã¨ããè¨èªã«å¯¾ãã¦kontributeããã¦ãããï¼ã¨ããã»ãã·ã§ã³ã§ãã. ç°å¢æ§ç¯ããkontributeããã¾ã§ã®ã¤ãããç°¡æ½ã«ã¾ã¨ã¾ã£ã¦ãã¦é常ã«ããããããã£ãã§ã.ä½ããããããã£ãã®ã¯,èªåããããªãµãã«kontributeãã¦ãããããª...ã¨æããã¦ãããshirajiããã®ãã¬ã¼ã³åã ã£ãã¨æãã¾ã. ããã°ãæ¸ããã£ããèªåã®PCã«kontributeã®ããã®ç°å¢ãä½ããªãã¦ã¯?
æ親ä¼
ç¾å³ããæçããã£ã±ãé£ã¹ãªããããã¯ãã³ã«ã¼ã«ãé©ç¨ããªããã話ãã¾ãã.ããã¯ãã³ã«ã¼ã«ã¨ã¯ãã¼ãã«ã®1ç®æã«äººãå ¥ãããããããªç©ºãã¹ãã¼ã¹ãè¨ãã¾ãããã¨ãããã®ã§ã.(ãããåãã¦ã®çµé¨ã§ãã)ãã®ãããããã£ã¦ã,è²ã ãªå½¢ã§Kotlinã¨é¢ãã£ã¦ãã人ãã¡ã¨æ§ã ãªã話ããããã¨ãã§ãã¾ãã. 話ããããã¨ããã§ã®ã¿ã³ãã¥éãçºæ®ããç§ã§ãããªãã¨ããªã£ã¦ããã£ãã§ã. 仲è¯ãã話ãã¦ããã ããçããæ¬å½ã«ãããã¨ããããã¾ã.
ã¾ã¨ã
ãã§ã«æãé常ã«é·ããªã£ã¦ãã¾ã£ã¦ããã®ã§ã¾ã¨ããã¨
- ãã£ã¨Kotlinãç¥ãããããã£ã¨Kotlinã使ããã
- Kotlinã¨ããè¨èªã¨ãããæ±ãããã¦ãã人éã®ã³ãã¥ããã£ã¨ãã£ã¨é¢ãã£ã¦ãããã
- Kotlinã¨ããè¨èªã«å¯¾ãã¦ãä½ããã®è²¢ç®ãã§ããããããã
- Kotlinã¯å¯æã
ã¨ãããªæãã§ã.
次åã®Kotlin Fest 2019ã¯æªå®ã ããã§ãããã£ã¨éå¬ãããã¨æãã®ã§, ãã£ã¨å¯æ¥ã«é¢ãã£ã¦ããããå¬ããã§ãã.
ãã®ããã®ä¸æ©ã¨ãã¦kontributerã«ãªãããã®ç°å¢æ§ç¯ããã¦ãã¾ã!