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

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

Dbab5e5a1fd54531e1119ede6b3b9e65?s=47 Ryosuke Horie
September 21, 2017

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

Dbab5e5a1fd54531e1119ede6b3b9e65?s=128

Ryosuke Horie

September 21, 2017
Tweet

Transcript

  1. © 2017 VASILY,Inc. ,PUMJOͰॻ͔Εͨ"OESPJEΞϓϦΛ #B[FMͰϏϧυ͢Δ "OESPJE5FTU/JHIU !)PSJF

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

    "OESPJEΤϯδχΞ w ϏʔϧɺࣗಈԽ޷͖ ϕϧΪʔϏʔϧ΢ΟʔΫΤϯυ!ϕϧΪʔ ͜ͷޙͷهԱ͕ແ͍
  3. © 2017 VASILY,Inc. #B[FM

  4. © 2017 VASILY,Inc. #B[FM ಡΈํΘ͔ΒΜ

  5. –Bazel FAQ How do you pronounce “Bazel"? l5IFTBNFXBZBTCBTJM UIFIFSC JO

    64&OHMJTI#":[FM*USIZNFTXJUI IB[FM*1"㷦CF㸍[㷧ⓒMz
  6. © 2017 VASILY,Inc. #B[FM w (PPHMF੡Ϗϧυπʔϧ w IUUQTCB[FMCVJME w ΫοΫύου͞Μͷهࣄ͕Θ͔Γ΍͍͢

    w IUUQUFDIMJGFDPPLQBEDPNFOUSZJOUSPEVDFCB[FMCVJME
  7. © 2017 VASILY,Inc. Ϟνϕʔγϣϯ w #B[FMͰͷ,PUMJOϓϩδΣΫτͷϏϧυʹ͍ͭͯ஌Γ͍ͨ w ,PUMJOͰॻ͔Εͨ"OESPJEΞϓϦͷϏϧυํ๏ w ςετͷ࣮ߦํ๏

    w $*؀ڥͰͷϏϧυͷ࣮ߦํ๏
  8. © 2017 VASILY,Inc. #B[FMͰͷ,PUMJOϓϩδΣΫτͷϏϧυ

  9. © 2017 VASILY,Inc. #B[FMͰͷ,PUMJOϓϩδΣΫτͷ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    w IUUQTHJUIVCDPNIPSJF#B[FM4BNQMF"QQMJDBUJPO
  15. © 2017 VASILY,Inc. "1,Λग़ྗ͢Δ·ͰͷྲྀΕ w LPUMJO@BOESPJE@MJCSBSZͰ,PUMJOͷίʔυΛKBSʹม׵ w ,+7.$PNQJMFSͰόΠτίʔυʹίϯύΠϧ w BOESPJE@CJOBSZͷґଘʹKBSΛؚΊϏϧυ

    w "1,͕CB[FMCJOҎԼʹੜ੒
  16. © 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
  17. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w 4%,7FSTJPOΛ"OESPJE.BOJGFTUͰࢦఆ w BOESPJE@TEL@SFQPTJUPSZͰ͸ࢦఆ͠ͳ͍ w NJO4EL7FSTJPO͕ʹͳΔͨΊ

    VTFTTELBOESPJENJO4EL7FSTJPO BOESPJEUBSHFU4EL7FSTJPO BOESPJENBY4EL7FSTJPO
  18. © 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  >  
  19. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w #6*-%pMF w EFQTʹLPUMJO@BOESPJE@MJCSBSZͰ࡞੒ͨ͠UBSHFU໊Λࢦఆ BOESPJE@CJOBSZ 

    OBNFBQQ  DVTUPN@QBDLBHF1"$,"(&  NBOJGFTU."/*'&45  EFQT< TSD  > 
  20. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w CB[FMCVJMEBQQTSDBQQ */'0'PVOEUBSHFU &3303#B[FM4BNQMF"QQMJDBUJPOBQQTSD#6*-%$PNQJMJOH,PUMJOTPVSDF pMFTUPBQQTSDTSD@DPNQJMFKBSGBJMFE &YJU

     8FMDPNFUP,PUMJOWFSTJPO +3&@C  5ZQFIFMQGPSIFMQ RVJUGPSRVJU  FYDFQUJPOKBWBJP*0&YDFQUJPO0QFSBUJPOOPUQFSNJUUFE ɾ ɾ ɾ
  21. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w 0QFSBUJPOOPUQFSNJUUFEͷ৔߹TVEPͰճආ w TVEP&CB[FMCVJMEBQQTSDBQQ */'0'PVOEUBSHFU 5BSHFUBQQTSDBQQVQUPEBUF

    CB[FMCJOBQQTSDBQQ@EFQMPZKBS CB[FMCJOBQQTSDBQQ@VOTJHOFEBQL CB[FMCJOBQQTSDBQQBQL */'0&MBQTFEUJNFT $SJUJDBM1BUIT
  22. © 2017 VASILY,Inc. "OESPJEΞϓϦͷϏϧυ w CB[FMNPCJMFJOTUBMMBQQTSDBQQ */'0'PVOEUBSHFU */'0'SPN*OTUBMMJOHBQQTSDBQQ 6QEBUJOHEFY 6QEBUJOHBQQMJDBUJPOSFTPVSDFT

    6QEBUJOHOBUJWFMJCT 5BSHFUBQQTSDBQQVQUPEBUF CB[FMCJOBQQTSDBQQ@pMFTGVMM@EFQMPZ@NBSLFS CB[FMCJOBQQTSDBQQ@pMFTEFQMPZ@JOGP@JODSFNFOUBMEFQMPZJOGPQC */'0&MBQTFEUJNFT $SJUJDBM1BUIT
  23. © 2017 VASILY,Inc. ςετͷ࣮ߦ

  24. © 2017 VASILY,Inc. ςετͷ࣮ߦ w 803,41"$&pMF w KVOJUͷUBSHFUΛ௥Ճ NBWFO@KBS 

    OBNFKVOJU  BSUJGBDUKVOJUKVOJUKBS 
  25. © 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  >  
  26. © 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
  27. © 2017 VASILY,Inc. $*؀ڥͰͷϏϧυͷ࣮ߦ

  28. © 2017 VASILY,Inc. $*؀ڥͰͷϏϧυͷ࣮ߦ w BOESPJE@TEL@SFQPTJUPSZ͕"/%30*%@)0.&Λ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