Slide 1

Slide 1 text

Mul$ple Developers, One App How to Not Break Everything by Andy Dyer #babbq16

Slide 2

Slide 2 text

#babbq16

Slide 3

Slide 3 text

#babbq16

Slide 4

Slide 4 text

#babbq16

Slide 5

Slide 5 text

#babbq16

Slide 6

Slide 6 text

#babbq16

Slide 7

Slide 7 text

How to Not Break Everything • Laying the founda/on • Ensuring code quality • Automa5ng things no one wants to do #babbq16

Slide 8

Slide 8 text

Laying the Founda/on - Organiza/on • Ver%cal, feature focused teams • Agile Stuff™ • Weekly pla

Slide 9

Slide 9 text

Laying the Founda/on - Project Structure • Separate repos for core business logic and apps • Package per feature • Feature flags to enable/disable func9onality #babbq16

Slide 10

Slide 10 text

Laying the Founda/on - Build Types productFlavors { alpha { // Upload to Crashlytics for QA testers } beta { // Upload to Crashlytics for beta testers } prod { // Release to Google Play } } #babbq16

Slide 11

Slide 11 text

How to Not Break Everything • Laying the founda0on • Ensuring code quality • Automa0ng things no one wants to do #babbq16

Slide 12

Slide 12 text

Ensuring Code Quality - Common Style #babbq16

Slide 13

Slide 13 text

Ensuring Code Quality - Code Reviews • Pull requests with at least one reviewer before being merged into develop branch • Mul9ple reviewers for significant changes #babbq16

Slide 14

Slide 14 text

Ensuring Code Quality - Automated Tes6ng • Architect for tes-ng • Dependency injec-on to group & isolate related components • MVP or similar pa=ern • Unit test as much as possible, Espresso for UI tests • Con-nuous integra-on server for building latest source and running tests #babbq16

Slide 15

Slide 15 text

Ensuring Code Quality - Alpha & Beta Tes9ng • QA team runs automated integra1on tests and performs targeted manual tests as necessary • Beta testers help iden1fy any cri1cal bugs prior to release • Staged rollout on Google Play for final release #babbq16

Slide 16

Slide 16 text

git rebase develop Early and o*en #babbq16

Slide 17

Slide 17 text

How to Not Break Everything • Laying the founda0on • Ensuring code quality • Automa'ng things no one wants to do #babbq16

Slide 18

Slide 18 text

Automa'ng Things No One Wants to Do - Git Hooks • Ensure code compiles before each commit • Ensure unit and instrumenta5on tests pass before each push #babbq16

Slide 19

Slide 19 text

Automa'ng Things No One Wants to Do - GitHub Hooks • Change Jira ,cket status to "Next Build" when pull request is merged • No,fy chat room when a pull request is opened, merged, etc. #babbq16

Slide 20

Slide 20 text

Automa'ng Things No One Wants to Do - Gruel Plugin • No$fy a HipChat channel with a specific message • Transi$on Jira issues matching a JQL filter to another status and update fields • Increment version numbers in a gradle.proper$es file • Specify a naming paDern for *.jar and *.apk files • Upload an *.apk file to Crashly$cs #babbq16

Slide 21

Slide 21 text

Gruel Plugin - No.fy HipChat hipchat { auth_token = '{AUTH TOKEN}' } task notifyHipchat( type: com.glasstowerstudios.gruel.tasks.hipchat.HipChatNotificationTask) { // Can be one of: ['purple', 'red', 'green', 'yellow', 'gray', 'random'] color = 'yellow' message = "Your message here. You can include simple html" channelName = "Name of channel to notify" } #babbq16

Slide 22

Slide 22 text

Gruel Plugin - Transi/on Jira Issues task jiraUpdate( type: com.glasstowerstudios.gruel.tasks.jira.JiraTransitionTask) { userName = JIRA_USERNAME password = JIRA_PASSWORD jiraRootUrl = 'https://COMPANY.atlassian.net' jql = 'project = "PROJECT_NAME" AND status = "CURRENT_STATUS"' toStatus = 'NEW_STATUS' fieldUpdates = ['customfield_123': 'Updating a custom field', 'customfield_456': 'Updating another custom field'] } #babbq16

Slide 23

Slide 23 text

Gruel Plugin - Increment Version // Specifies an integer that is monotonically increasing with each // new version. PROJECTNAME_VERSION_CODE // Specifies a human-readable string that is used to represent a // version number to users (e.g. "3.0.0"). PROJECTNAME_VERSION_NAME #babbq16

Slide 24

Slide 24 text

Gruel Plugin - Naming APK Files apply plugin: 'gruel' gruel { archiveName "%appName%", "%version%", "%codeName", "%buildType%", "%commitHash%" version android.defaultConfig.versionName commitHash gitSha() } #babbq16

Slide 25

Slide 25 text

Gruel Plugin - Crashly1cs Upload android { productFlavors { alpha { gruel.uploadUsing 'crashlytics', 'alpha-testers', 'release', delegate } } } #babbq16

Slide 26

Slide 26 text

Links • Gruel Plugin: github.com/jwir3/gruel • Slides: andydyer.org • Twi2er: @dammitandy • Google Plus: +AndrewDyer #babbq16