Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlinで書かれたAndroidアプリをBazelでビルドする

 Kotlinで書かれたAndroidアプリをBazelでビルドする

Ryosuke Horie

September 21, 2017
Tweet

More Decks by Ryosuke Horie

Other Decks in Programming

Transcript

  1. © 2017 VASILY,Inc. ࣗݾ঺հ w !)PSJF w 7"4*-: JOD w

    "OESPJEΤϯδχΞ w ϏʔϧɺࣗಈԽ޷͖ ϕϧΪʔϏʔϧ΢ΟʔΫΤϯυ!ϕϧΪʔ ͜ͷޙͷهԱ͕ແ͍
  2. –Bazel FAQ How do you pronounce “Bazel"? l5IFTBNFXBZBTCBTJM UIFIFSC JO

    64&OHMJTI#":[FM*USIZNFTXJUI IB[FM*1"㷦CF㸍[㷧ⓒMz
  3. © 2017 VASILY,Inc. #B[FMͰͷ,PUMJOϓϩδΣΫτͷϏϧυ 3VMF ֓ཁ LPUMJO@SFQPTJUPSJFT 8PSLTQBDF΁ͷಡΈࠐΈ LPUMJO@MJCSBSZ ,PUMJOͷιʔε͔Β+BWBͷϥΠϒϥϦΛϏϧυ

    LPUMJO@CJOBSZ ,PUMJOͷιʔε͔Β+BWBͷόΠφϦΛϏϧυ LPUMJO@BOESPJE@MJCSBSZ ,PUMJOͷιʔε͔Β"OESPJEϥΠϒϥϦΛϏϧυ LPUMJO@UFTU ,PUMJOͰͷςετΛ࣮ߦ w ,PUMJO3VMFTGPS#B[FMͰఏڙ͞ΕΔ3VMF
  4. © 2017 VASILY,Inc. #B[FMͰͷ,PUMJOϓϩδΣΫτͷϏϧυ w 803,41"$&pMF HJU@SFQPTJUPSZ  OBNFPSH@QVCSFG@SVMFT@LPUMJO 

    SFNPUFIUUQTHJUIVCDPNQVCSFGSVMFT@LPUMJOHJU  UBHW VQEBUFBTOFFEFE  MPBE !PSH@QVCSFG@SVMFT@LPUMJOLPUMJOSVMFTC[M LPUMJO@SFQPTJUPSJFT  LPUMJO@SFQPTJUPSJFT ॳճ͸࠷৽ͷ,PUMJOͷϦϦʔε൛Λऔಘͯ͘͠ΔͷͰॏ͍
  5. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w 803,41"$&pMF w BOESPJE@TEL@SFQPTJUPSZΛ௥Ճ BOESPJE@TEL@SFQPTJUPSZ 

    OBNFlBOESPJETEL  QBUIlQBUIUP"OESPJETELz QBUIΛࢦఆ͠ͳ͍৔߹"/%30*%@)0.&Λࢀর BQJ@MFWFM NJO4EL7FSTJPO͸ࢦఆͰ͖ͳ͍ʁ υΩϡϝϯτݟͨݶΓແ͠  CVJME@UPPMT@WFSTJPO
  6. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w 4%,7FSTJPOΛ"OESPJE.BOJGFTUͰࢦఆ w BOESPJE@TEL@SFQPTJUPSZͰ͸ࢦఆ͠ͳ͍ w NJO4EL7FSTJPO͕ʹͳΔͨΊ

    VTFTTELBOESPJENJO4EL7FSTJPO BOESPJEUBSHFU4EL7FSTJPO BOESPJENBY4EL7FSTJPO
  7. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w #6*-%pMF w EFQFOEFODJFTͷ௥Ճ 1"$,"(&DPNIPSJFCB[FMTBNQMFBQQMJDBUJPO ."/*'&45NBJO"OESPJE.BOJGFTUYNM

    LPUMJO@BOESPJE@MJCSBSZ  OBNFTSD  TSDTHMPC <NBJOLPUMJO  LU>  DVTUPN@QBDLBHF1"$,"(&  NBOJGFTU."/*'&45  SFTPVSDF@pMFTHMPC <NBJOSFT  >  BBS@EFQT< l!BOESPJETELDPNBOESPJETVQQPSUBQQDPNQBUW  !BOESPJETELDPNBOESPJETVQQPSUDBSEWJFXW  !BOESPJETELDPNBOESPJETVQQPSUSFDZDMFSWJFXW   !BOESPJETELDPNBOESPJETVQQPSUEFTJHO  >  
  8. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w #6*-%pMF w EFQTʹLPUMJO@BOESPJE@MJCSBSZͰ࡞੒ͨ͠UBSHFU໊Λࢦఆ BOESPJE@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JUKBS 
  13. © 2017 VASILY,Inc. ςετͷ࣮ߦ w #6*-%pMF w LPUMJO@UFTUΛ࢖༻ w ֤छґଘΛ௥Ճ

    w ςετର৅ͷΫϥε΋௥Ճ ͢Δඞཁ͕͋Δ ςετର৅ͷΫϥε LPUMJO@MJCSBSZ  OBNFBQQ@TSD  TSDTHMPC <NBJOLPUMJO &YBNQMFLU>   LPUMJO@UFTU  OBNFFYBNQMF@LU@UFTU  UFTU@DMBTT lDPNIPSJFCB[FMTBNQMFBQQMJDBUJPO&YBNQMF6OJU5FTU  TSDTHMPC <lUFTU  LU> ςετίʔυͷಡΈࠐΈ TJ[FTNBMM  EFQT<lBQQ@TSD> ςετର৅ΫϥεΛґଘʹ௥Ճ KBWB@EFQT< !KVOJUKBS  >  
  14. © 2017 VASILY,Inc. ςετͷ࣮ߦ w CB[FMUFTUBQQTSDFYBNQMF@LU@UFTU */'0'PVOEUFTUUBSHFU 5BSHFUBQQTSDFYBNQMF@LU@UFTUVQUPEBUF CB[FMCJOBQQTSDFYBNQMF@LU@UFTUKBS CB[FMCJOBQQTSDFYBNQMF@LU@UFTU

    */'0&MBQTFEUJNFT $SJUJDBM1BUIT BQQTSDFYBNQMF@LU@UFTU1"44&%JOT &YFDVUFEPVUPGUFTUUFTUQBTTFT
  15. © 2017 VASILY,Inc. $*؀ڥͰͷϏϧυͷ࣮ߦ w $JSDMF$*Ͱࢼͨ͠ w ճ͚ͩ੒ޭ w 00.͕ଟൃ

    w #B[FM͕࢖͏ϝϞϦʹ੍ݶֻ͚ Δͱྑͦ͞͏ WFSTJPO KPCT CVJME XPSLJOH@EJSFDUPSZdDPEF EPDLFS JNBHFDJSDMFDJBOESPJEBQJBMQIB FOWJSPONFOU "/%30*%@)0.&PQUBOESPJETEL TUFQT DIFDLPVU ŠলུŠ SVO OBNF3VO5FTUT DPNNBOECB[FMUFTUBQQTSDFYBNQMF@LU@UFTU SVO OBNF3VOCVJME DPNNBOETVEP&CB[FMCVJMEBQQTSDBQQ