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

新規チームで新規開発を始める時にやること

 新規チームで新規開発を始める時にやること

DMM Android勉強会で発表した内容です

Shinnosuke Kugimiya

March 27, 2019
Tweet

More Decks by Shinnosuke Kugimiya

Other Decks in Programming

Transcript

  1. X © DMM.com ςετΛॻ͍ͯͳ͍ w ϦϑΝΫλͰ͖ͳ͍ w มߋޙͷίʔυͱมߋલͷίʔυ͕ಉ͡ಈ͖Λ͢Δͱ͍͏อূ͕ Ͱ͖ͳ͍ w

    Ͳ͏͍͏ಈ࡞Λਖ਼ͱͨ͠ϩδοΫͳͷ͔Θ͔Βͳ͍ͷͰɺϨϏϡʔ͸ͳ Μͱͳ͘େৎ෉΍ΖͰBQQSPWF w ͦ΋ͦ΋΄΅΄΅ಈ͍ͯͳ͍ʢಈ࡞֬ೝ͞Εͯͳ͍ʣ w νʔϜ͕ΪεΪε͢Δ
  2. X © DMM.com ৽ن։ൃ࣌ʹɺ·ͣ͸։ൃपΓͷ੔උΛ͢Δ͜ͱ͕ॏཁ w ෺ʹΑͬͯ͸ɺ్த͔Βͷಋೖ͕೉͍͠΋ͷɺίετ͕େ͖͍΋ͷ͕͋ Δ w ઃܭํ਑ w

    ಛʹ৽نνʔϜͰ͸ॏཁ w ςετํ਑ w ஌Βͳ͍ਓɺ஌ͬͯΔ͚Ͳಇ͍ͨ͜ͱͳ͍ਓͱɺԿ΋޻෉΋ͳ͘ େ͖ͳ΋ͷΛ࡞Γ্͛Δͷ͸ࠔ೉ɻԿ͔͠Βͷτϥϒϧ͸͋Γ͑ ΔͷͰɺ͋Β͔͡Ί૝ఆͰ͖Δ΋ͷΛରॲ͓ͯ͜͠͏ɻ
  3. X © DMM.com νΣοΫϦετ  <>ϑΥʔϚολ  <>$*  <>$%

     <>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <>HSBEMFपΓͷ੔ཧ  <>%BOHFS  <>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  4. X © DMM.com <ࣗ෼ͷ৔߹>ελΠϧɾϑΥʔϚοτͷઃఆ FEJUPSDPOpH΋ઃఆ͠Α͏ root = true [*] insert_final_newline=true

    indent_size = 2 continuation_indent_size = 2 IUUQTHJUIVCDPNLHNZTIJOOFXQSPKFDUBOESPJEQVMM
  5. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <>$*  <>$%

     <>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <>HSBEMFपΓͷ੔ཧ  <>%BOHFS  <>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  6. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <Y>$*  <>$%

     <>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <>HSBEMFपΓͷ੔ཧ  <>%BOHFS  <>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  7. X © DMM.com <ࣗ෼ͷ৔߹>$%ͷಋೖ - run: | GIT_HASH=$(git rev-parse --short

    HEAD) GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) curl \ -F "token=$DEPLOY_GATE_API_KEY" \ -F "file=@app/build/outputs/apk/debug/app-debug.apk" \ -F "message=git:$GIT_HASH" \ -F "distribution_name=$GIT_BRANCH" \ https://deploygate.com/api/users/kgmyshin/apps IUUQTHJUIVCDPNLHNZTIJOOFXQSPKFDUBOESPJEDPNNJUGGEGFBEGCDEBED $*ʹઃఆ
  8. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <Y>$*  <Y>$%

     <>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <>HSBEMFपΓͷ੔ཧ  <>%BOHFS  <>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  9. X © DMM.com <ࣗ෼ͷ৔߹>-JOUͷઃఆBOESPJEMJOU <?xml version="1.0" encoding="UTF-8"?> <lint> <issue id="all">

    <ignore path="build" /> </issue> <issue id="GoogleAppIndexingWarning" severity="ignore" /> </lint> ઃఆϑΝΠϧΛͭ͘Δ
  10. X © DMM.com android { ... lintOptions { ... lintConfig

    file("${rootDir.absolutePath}/lint/lint.xml") } } HSBMEFʹઃఆ͢Δɻ <ࣗ෼ͷ৔߹>-JOUͷઃఆBOESPJEMJOU
  11. X © DMM.com <ࣗ෼ͷ৔߹>-JOUͷઃఆLUMJOU buildscript { repositories { … maven

    { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "org.jmailen.gradle:kotlinter-gradle:1.22.0" … } } 5PQMFWFMͷCVJMEHSBMEFʹઃఆ͢Δɻ ˞LPUMJOUFSHSBEMFΛ࢖ͬͯ·͕͢ɺଞͷ෺Ͱ΋͍͍Ͱ͢ɻ·ͨLUMJOU͡Όͳͯ͘΋EFUFLUͰ΋0,Ͱ͢
  12. X © DMM.com <ࣗ෼ͷ৔߹>-JOUͷઃఆLUMJOU NPEVMFͷCVJMEHSBMEFʹઃఆ͢Δɻ apply plugin: "org.jmailen.kotlinter" kotlinter {

    ignoreFailures = true reporters = ['checkstyle', 'plain'] indentSize = 2 continuationIndentSize = 2 }
  13. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <Y>$*  <Y>$%

     <Y>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <>HSBEMFपΓͷ੔ཧ  <>%BOHFS  <>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  14. X © DMM.com <ࣗ෼ͷ৔߹>HSBEMFपΓͷ੔ཧ ext.kotlin_version = '1.3.21' ext.versions = [

    compileSdk: 28, minSdk : 21, targetSdk : 28, code : 1, name : "0.9.0" ] ext.deps = [ kotlin : [ core : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version", reflect: "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" ], 7FSTJPOܥΛ·ͱΊͯ͠·͏
  15. X © DMM.com <ࣗ෼ͷ৔߹>HSBEMFपΓͷ੔ཧ android { compileSdkVersion versions.compileSdk defaultConfig {

    minSdkVersion versions.minSdk targetSdkVersion versions.targetSdk versionCode versions.code versionName versions.name ... } ... } dependencies { implementation deps.kotlin.core implementation deps.androidx.appcompat implementation deps.androidx.constraintlayout implementation deps.androidx.lifecycle implementation deps.androidx.recyclerview ... ͜Μͳײ͡Ͱ͔͚Δ
  16. X © DMM.com <ࣗ෼ͷ৔߹>HSBEMFपΓͷ੔ཧ apply plugin: 'com.android.library' apply from: "${rootDir.absolutePath}/modules/android_partial.gradle"

    dependencies { … } apply from: "${rootDir.absolutePath}/modules/ktlint_partial.gradle" BOESPJEͰͷઃఆ΍ɺLUMJOUपΓ΋·ͱΊͯ͠·͑͹ɺ ֤ϞδϡʔϧͷCVJMEHSBEMFΛ͜Μͳײ͡ʹ͢Δ͜ͱ΋Ͱ͖Δ IUUQTHJUIVCDPNLHNZTIJOOFXQSPKFDUBOESPJEQVMM
  17. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <Y>$*  <Y>$%

     <Y>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <Y>HSBEMFपΓͷ੔ཧ  <>%BOHFS  <>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  18. X © DMM.com %BOHFSͷઃఆ # Warn when there is a

    big PR warn("a large PR") if git.lines_of_code > 1000 ### lint ### Dir.glob("**/lint-results.xml").each { |report| android_lint.filtering = true android_lint.report_file = report.to_s android_lint.lint(inline_mode: true) } զ͕Ոͷ%BOHFSpMFʢͷҰ෦ʣɻ ϚϧνϞδϡʔϧʹΑΔରԠ͕ೖΓ·͢ɻ IUUQTHJUIVCDPNLHNZTIJOOFXQSPKFDUBOESPJEQVMM
  19. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <Y>$*  <Y>$%

     <Y>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <Y>HSBEMFपΓͷ੔ཧ  <Y>%BOHFS  <>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  20. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <Y>$*  <Y>$%

     <Y>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <Y>HSBEMFपΓͷ੔ཧ  <Y>%BOHFS  <Y>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  21. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <Y>$*  <Y>$%

     <Y>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <Y>HSBEMFपΓͷ੔ཧ  <Y>%BOHFS  <Y>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <Y>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  22. X © DMM.com νΣοΫϦετ  <Y>ϑΥʔϚολ  <Y>$*  <Y>$%

     <Y>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <Y>HSBEMFपΓͷ੔ཧ  <Y>%BOHFS  <Y>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <Y>ઃܭํ਑  <Y>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ
  23. X © DMM.com ։ൃϑϩʔ TQSJOUͷྲྀΕ  ϓϥϯχϯάͷ೔  ϓϥϯχϯά͕ऴΘͬͨΒͦͷ··ू·ͬͯશͯͷλεΫͷΫϥεਤ Λख෼͚ͯ͠ॻ͘

     6TF$BTF͚ͩγʔέϯεਤ΋ॻ͘  ͦΕҎ֎ͷ೔͸ΫϥεਤɺγʔέϯεਤΛݩʹΨϦΨϦίʔσΟϯά͢ Δ͚ͩ
  24. X © DMM.com ։ൃϑϩʔ UBTLͷྲྀΕʢઃܭํ਑͕ೃછΉ·Ͱ͸ࡉ͔͘΍ͬͯͨʣ  ػೳ࣮૷ϒϥϯν࡞੒  ೿ੜͤͯ͞EPNBJO࣮૷Ͱ13ͭ 

    JOGSB࣮૷Ͱ13ͭ  7JFX.PEFM -JWF%BUBΛ࣮૷ͯ͠13ͭ  'SBHNFOUʢओʹσβΠϯʣΛ࣮૷ͯ͠13ͭ  6TF$BTFΛ࣮૷ͯ͠13̍ͭ  ࠷ޙʹ%*Ͱܨ͛ͯಈ࡞֬ೝ·Ͱ΍ͬͯ13ͭ
  25. X © DMM.com νΣοΫϦετ  <>ϑΥʔϚολ  <>$*  <>$%

     <>-JOU BOESPJEMJOU LUMJOUPSEFUFLU   <>HSBEMFपΓͷ੔ཧ  <>%BOHFS  <>ϝοηʔδςϯϓϨʔτʢHJUIVC HJUʣ  <>ઃܭํ਑  <>ςετํ਑  <>։ൃϑϩʔ  PQU $SBTIMZUJDT  PQU σόοάϝχϡʔ