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

sabotage

 sabotage

054312bb8749ab2405c3c5364bc1be1e?s=128

yoppie

May 27, 2019
Tweet

More Decks by yoppie

Other Decks in Technology

Transcript

  1. ͞΅͖ͬͯͨ͜ͱ

  2. Facebook hi.kowaii.de / Twitter @yoppie_x Github yoshiya12X / Qiita yoppie_x

    ϒϩά https://yoppiex.hatenablog.com/ yoppie
  3. 2013೥4݄ - 2015೥3݄ େֶͰιϑτ΢ΣΞ޻ֶ • High Impact Bugͷݚڀ • Androidʹؔ͢Δݚڀ

    2015೥4݄ - 2017೥3݄ େֶӃͰιϑτ΢ΣΞ޻ֶ WebΞϓϦͱAndroidΞϓϦͷ
 डୗ։ൃͱόΠτ 2017೥4݄ - 2019೥5݄ ͙ΔͳͼͰαʔόʔαΠυ झຯͰAndroid 2019೥6݄ ~ ϑϦʔϥϯε
  4. 2013೥4݄ - 2015೥3݄ େֶͰιϑτ΢ΣΞ޻ֶ • High Impact Bugͷݚڀ • Androidʹؔ͢Δݚڀ

    2015೥4݄ - 2017೥3݄ େֶӃͰιϑτ΢ΣΞ޻ֶ WebΞϓϦͱAndroidΞϓϦͷ
 डୗ։ൃͱόΠτ 2017೥4݄ - 2019೥5݄ ͙ΔͳͼͰαʔόʔαΠυ झຯͰAndroid 2019೥6݄ ~ ϑϦʔϥϯε
  5. Engineer Blogs

  6. ࠷ۙνʔϜʹͳͬͨ

  7. ͞΅͖ͬͯͨ͜ͱ • CI/CD؀ڥ • ΞφϦςΟΫε • Lint • ςετίʔυ

  8. ͞΅͖ͬͯͨ͜ͱ • CI/CD؀ڥ • ΞφϦςΟΫε • Lint • ςετίʔυ

  9. CI/CD؀ڥ

  10. ΞοϓσʔτΛ഑෍ • νʔϜʹͳͬͨ͜ͱʹΑΓɺ
 ։ൃͨ͠ΞοϓσʔτΛϝϯόʔʹ഑෍͢Δ ඞཁੑ͕Ͱͨ • ࢖ͬͨ΋ͷ
 Bitrise, DeployGate

  11. ഑෍·ͰͷྲྀΕ 1. git pushͰมߋ෼Λpush 2. BitriseͷWorkflowൃՐ 1. AndroidϓϩδΣΫτͷBuild 2. DeployGate΁Ξοϓϩʔυ

  12. ϦϙδτϦͱBitriseΛඥ͚ͮΔ 1. Add New AppϘλϯΛԡԼ
 
 
 
 
 2.

    SET PRIVACY OF THE APPͰʮPrivateʯ or ʮPublicʯΛબ୒ 3. Github, Bitbucket, GitLab, Other/Manual͔Βର৅ͱ͢Δ
 ϦϙδτϦΛબ୒
  13. 4. Setup repository accessͰೝূํ๏Λઃఆ 5. Choose branchͰݕূͱηοτΞοϓΛ͢ΔͨΊͷ
 branchΛࢦఆ
 
 


    
 
 
 
 
 
 
 ଘࡏ͠ͳ͍branchΛࢦఆ͢Δͱ
 ࣍ͷεςοϓͷValidating repositoryͰౖΒΕΔ
  14. 6. Validate͕௨Δͱ࣍ͷεςοϓͷ
 Project build configuration͕ࣗಈͰग़ྗ͞Ε
 BitriseͷԸܙΛड͚Δ͜ͱʹͳΔ

  15. 7. ઃఆΛฤू͠ConfirmϘλϯΛԡ͢ͱΞΠίϯΛઃఆ͢Δ
 ޻ఔʹөΔͷͰΞϓϦͷΞΠίϯͳͲΛࢦఆ 8. Webhook setupͰgit pushΛτϦΨʔʹWorkflowΛ
 ൃՐͤ͞Δઃఆ
 
 


    
 
 
 
 Register a Webhook for me!ͱ͍͏ϘλϯΛΆͪΔ͚ͩ
  16. σϑΥϧτͰ༻ҙ͞Εͨ
 Workflow

  17. AndroidϓϩδΣΫτͷBuild Workflowʹ͋Δ+ϘλϯͰAndroid BuildΛ௥Ճ

  18. DeployGate΁Ξοϓϩʔυ AndroidBuildޙʹDeployGate UploadΛ௥Ճ DeployGate UploadͰ͸ࡉ͔͘ઃఆ

  19. • Version
 always latest • DeployGate: API Key
 1. DeployGateͷϓϩϑΟʔϧϖʔδʹ͋ΔAPI

    keyΛίϐʔ
 2. ೖྗ͠Α͏ͱ͢ΔͱϞʔμϧ͕දࣔ͞Ε, Bitrise্Ͱѻ͏
 άϩʔόϧม਺ͱͯ͠ఆٛ͢ΔΑ͏ʹଅ͞ΕΔ
 
 
 
 
 
 
 
 
 3. $DEPLOY_GATE_API_KEYΛ࡞੒͠ʮ1ʯͰίϐʔͨ͠
 ஋Λ୅ೖ
  20. • DeployGate: Owner Name
 DeployGateͰ࣮ࡍʹ࢖͍ͬͯΔΞΧ΢ϯτ໊Λఆٛ • App file path
 binary

    file(APK file)ͷύεΛఆٛ
 Bitrise͕༻ҙ͍ͯ͠Δม਺ʮ$BITRISE_APK_PATHʯΛ
 ॻ͘ͱ௨Δ • DeployGate: App Visibility
 ΞϓϦ໊ͱΞΠίϯͷදࣔΛࢦఆ
  21. ΞφϦςΟΫε

  22. Firebase AnalyticsΛಋೖ • ʮAndroidϓϩδΣΫτʹFirebaseΛ௥Ճ͢Δʯ
 ͱ͍͏FirebaseެࣜͷυΩϡϝϯτ
 https://firebase.google.com/docs/android/setup • AndroidStudio͔Βಋೖ

  23. 1. AndroidStudioͷ
 Tools>FirebaseΛ։͘

  24. 2. Analyticsͷ߲໨͔Β
 Connect to FirebaseΛԡ͢

  25. 3. 3఺ͷ֬ೝ߲໨ • Connect your app to Firebase͕Connectedʹͳ͍ͬͯΔ͜ͱ
 
 


    
 
 
 
 • AndroidϓϩδΣΫτʹgoogle-services.json͕࡞੒͞Ε͍ͯΔ͜ͱ • Firebaseͷίϯιʔϧը໘ʹϓϩδΣΫτ͕࡞੒͞Ε͍ͯΔ͜ͱ
  26. 4. AnalyticsΛΞϓϦʹೖΕΔ 1. Add Analytics to your appΛϙνΔ
 
 


    
 
 
 
 2. implementation 'com.google.firebase:firebase-core:16.0.4'
 ͕gradleʹ௥Ճ͞ΕΔͷͰ࠷৽ͷόʔδϣϯͷ
 ʮ16.0.8ʯʹमਖ਼
  27. Lint

  28. LintΛ࣮ߦ Lintͷ࣮ߦํ๏͸ෳ਺͋Γ·͕͢
 Android Studio্Ͱ࣮ߦ͢Δͷ͕؆୯ Android 39 warnings
 Kotlin 10 warnings

    2 infos
 Spelling 72typos
 XML 1 warning
  29. XML 1 warning appΛ࢖͓ͬͯΒͣ
 Namespace declaration is never usedͱͳ͍ͬͯͨ
 ʮxmlns:app="http://schemas.android.com/apk/res-auto"ʯ


    Λ࡟আ
  30. Spelling 72typos • ී௨ʹεϖϧϛε
 Entity Entitiy
 Thumbnail Thumnail • Moshi΍Sthethoͱ͍ͬͨޠ

  31. Android Studio > Preferences... > Spelling > Accepted Words

  32. Kotlin 10 warnings 2 infos • Unused import directive
 import

    android.util.Log͸ফ͠๨Ε͕ͪ • Unused symbol
 ࢖͍ͬͯͳ͍ϝιου͕͋Δͱ͍͏warning • privateԽ
 privateʹͰ͖Δͱ͜Ζ͸privateʹ͠Α͏
  33. Android 39 warnings • ImageViewʹcontentDescription͕ͳ͍
 ΞΫηγϏϦςΟ޲্ͷͨΊͷcontentDescription • layoutͷ഑ஔͷࢦఆํ๏
 android:layout_marginLeft →

    android:layout_marginStart • ඞཁͷͳ͍RelativeLayout
 This 'RelativeLayout' layout or its 'RelativeLayout' parent is useless; transfer the 'background' attribute to the other view
  34. • ࢖͍ͬͯͳ͍Ϧιʔεͷ࡟আ
 Unused resourcesͱ͍͏warning͕Ͱͨ
 Android Studio্Ͱ؆୯ʹফ͢͜ͱ͕Ͱ͖Δ
 (ґଘؔ܎͸֬ೝ͍ͯ͠ΔΑ͏ͩͬͨ)

  35. Lintͷର৅֎ϑΝΠϧͷࢦఆ app/lint.xml app/build.gradle

  36. ͜Ε͔Β͸͜·Ίʹ
 Lint͠·͢
 (ͨͿΜ)

  37. Ҏ্Ͱ͢