💻
Gürkan Fikret Günak - Personal
  • 👨‍💻About me
    • 🌊Journey
  • 🎯Dart
    • 🔬What's Dart Algorithms?
    • 🔬What's Dart Structures?
    • 🧮#01 Algorithm Guidance: Implementing Calculation Algorithms
    • 🧮#02 Algorithm Guidance: Two Sum
  • 📄Guidances
    • Flutter MVVM Guidance
    • Dart Programming Guidance
    • E-Commerce Use Cases
    • E-Commerce Applications
    • Flutter App Color Palette Usage Guidance
    • Flutter Custom AppBar Usage Guidance
    • Flutter Network Image Cache Usage Guidance
    • Flutter Project Bitbucket SSH Guidance
    • Flutter Project GitHub SSH Guidance
    • Flutter SliverAppBar Usage Guidance
    • The Importance of BuildContext in Flutter Tests Guidance
    • Internship Basic Guidance v0.1.0
    • The Importance of Type Casting in Flutter
    • Effective and Detailed Pull Request Guide
    • Flutter Naming Conventions Guidance
    • Flutter Widget Guidance
    • Semantic Commit Guidance
    • Being Part of a Mobile Software Team and Working on a Shared Architecture
    • Understanding Deep Links for Any Development Platform
    • The Journey of a Developer: Stories of Becoming Junior, Middle, and Senior Developer
    • Becoming a Team Leader: Growing in Sync with Your Team
    • Why IP Changes Are Important for Mobile Applications in Flutter
    • Why Your Growing Mobile Team Needs CI/CD and How to Build a Winning Strategy
    • Dart in 2024: 20 Features You Need to Know With Code Examples and Scenarios
    • Remote Theme Management with API (JSON): Implementing a Helper in Flutter SDK
    • Understanding and Implementing Force Upgrade in Your Flutter Project
    • Life Lessons from the Bald Eagle: A Metaphor for Growth, Change, and Leadership
    • The Beauty of Imperfection: Why Today Doesn’t Need to Be Perfect
    • # The Reverse Curve of Productivity: When Social Cohesion in Software Teams Starts to Hurt **How str
    • 📱 Mobil Uygulamalarda GraphQL Tercihi: Bakım ve Maliyet Etkiler
    • 📉 Türkiye’de Yazılım Projelerinde Süreç Yönetimi ve Ekonomik Kayıp: Bir Bekâ Sorunu mu?
  • 📹VIDEOS
    • Introduction to Flutter Boilerplate! ( Turkish )
    • Flutter APIs effective using ( English )
    • Understand to SDK ( English )
  • Links
    • 💼 | Linkedin
    • 🆇 | x.com
    • 📧 | Mail me
Powered by GitBook
On this page
  • Introduction
  • The Role of CI/CD in a Growing Team
  • The Transition from .apk to .aab
  • Why Move from .apk to .aab?
  • ProGuard: Securing and Optimizing Your Android App
  • Why ProGuard Matters
  • Example ProGuard Rules
  • Practical CI/CD Workflows
  • GitHub Actions Workflow for Android
  • GitHub Actions Workflow for iOS
  • Advice for Scaling Teams with CI/CD
  • 1. Assign Clear Roles
  • 2. Foster Collaboration
  • 3. Invest in Automation
  • 4. Monitor and Refine Pipelines
  • 5. Keep Documentation Updated
  • 6. Test Across Multiple Environments
  • Conclusion
  1. Guidances

Why Your Growing Mobile Team Needs CI/CD and How to Build a Winning Strategy

Introduction

In mobile development, the success of a growing team hinges on its ability to manage complexity, maintain quality, and deliver features rapidly. Continuous Integration (CI) and Continuous Deployment (CD) provide a framework to automate workflows, enhance collaboration, and ensure efficient delivery pipelines.

This article covers the importance of CI/CD for scaling teams, the shift from .apk to .aab for Android, the role of ProGuard for Android optimization and security, end-to-end GitHub Actions workflows for Android and iOS, and practical advice on fostering growth through CI/CD adoption.


The Role of CI/CD in a Growing Team

As teams grow, collaboration becomes more challenging. Developers work on multiple features, often merging changes that may conflict. Without automated pipelines, this complexity leads to delayed releases, integration issues, and quality lapses.

CI/CD mitigates these challenges by automating:

  • Code integration and testing to catch errors early.

  • Builds and deployments to reduce manual intervention.

  • Feedback loops to ensure continuous improvement.


The Transition from .apk to .aab

Why Move from .apk to .aab?

  • Optimized Delivery: AAB enables Google Play to create device-specific APKs, reducing app size and enhancing performance.

  • Dynamic Features: Allows modular app updates with on-demand features, improving user experience.

  • Mandatory Format: Since August 2021, Google Play requires new apps to use .aab.


ProGuard: Securing and Optimizing Your Android App

ProGuard is an essential tool for Android developers, offering app size reduction, code obfuscation, and performance optimizations.

Why ProGuard Matters

  1. App Size Reduction: Removes unused code and resources.

  2. Code Security: Protects intellectual property by obfuscating code.

  3. Performance Gains: Optimizes compiled code for better runtime efficiency.

Example ProGuard Rules

# Preserve classes with custom annotations
-keep @interface your.package.annotation.*

# Keep public classes used by JNI
-keepclasseswithmembernames class * {
    native <methods>;
}

# Avoid stripping of logging methods (optional)
-assumenosideeffects class android.util.Log {
    public static *** v(...);
    public static *** d(...);
    public static *** i(...);
    public static *** w(...);
    public static *** e(...);
}

Practical CI/CD Workflows

CI/CD workflows automate tasks like building, testing, and deploying applications. Below are workflows for Android and iOS using GitHub Actions.

GitHub Actions Workflow for Android

name: Android CI/CD

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout Code
      uses: actions/checkout@v3

    - name: Set up JDK
      uses: actions/setup-java@v3
      with:
        java-version: '11'

    - name: Cache Gradle Dependencies
      uses: actions/cache@v3
      with:
        path: ~/.gradle/caches
        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
        restore-keys: |
          ${{ runner.os }}-gradle-

    - name: Build Android App Bundle
      run: ./gradlew bundleRelease

    - name: Upload Build Artifact
      uses: actions/upload-artifact@v3
      with:
        name: app-bundle
        path: app/build/outputs/bundle/release/app-release.aab

GitHub Actions Workflow for iOS

name: iOS CI/CD

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: macos-latest

    steps:
    - name: Checkout Code
      uses: actions/checkout@v3

    - name: Set up Xcode
      uses: maxim-lobanov/setup-xcode@v2
      with:
        xcode-version: 14

    - name: Install CocoaPods
      run: pod install

    - name: Build Archive
      run: |
        xcodebuild \
        -workspace YourApp.xcworkspace \
        -scheme YourAppScheme \
        -sdk iphoneos \
        -configuration AppStoreDistribution \
        archive -archivePath $PWD/build/YourApp.xcarchive

    - name: Export IPA
      run: |
        xcodebuild \
        -exportArchive \
        -archivePath $PWD/build/YourApp.xcarchive \
        -exportOptionsPlist ExportOptions.plist \
        -exportPath $PWD/build

    - name: Upload IPA Artifact
      uses: actions/upload-artifact@v3
      with:
        name: ipa-file
        path: build/YourApp.ipa

Advice for Scaling Teams with CI/CD

1. Assign Clear Roles

  • CI/CD Champion: An engineer who oversees pipeline creation, maintenance, and optimization.

  • QA Specialist: Focuses on test coverage and integration testing within the CI pipeline.

  • Release Manager: Manages deployment schedules and ensures smooth production releases.

2. Foster Collaboration

  • Use tools like Slack or Microsoft Teams for build and test notifications.

  • Conduct regular retrospectives to evaluate pipeline effectiveness and identify bottlenecks.

3. Invest in Automation

  • Automate as much as possible—tests, builds, deployments, and even post-deployment monitoring.

  • Use caching for Gradle or CocoaPods dependencies to speed up builds.

4. Monitor and Refine Pipelines

  • Track metrics like build times, failure rates, and deployment frequency.

  • Optimize pipelines for speed and reliability.

5. Keep Documentation Updated

  • Maintain clear documentation for setting up and troubleshooting CI/CD pipelines.

  • Include guidelines for adding new tests or modifying workflows.

6. Test Across Multiple Environments

  • Ensure your app runs seamlessly across various devices, OS versions, and network conditions.

  • Use services like Firebase Test Lab for Android and BrowserStack for iOS.


Conclusion

Adopting CI/CD is not just about automation; it’s about transforming your team’s workflow to foster collaboration, improve quality, and deliver faster releases. For growing teams, CI/CD serves as the backbone for scaling operations while maintaining efficiency.

By leveraging tools like GitHub Actions, transitioning to modern formats like .aab, and securing apps with ProGuard, your team can focus on innovation rather than repetitive tasks.

"CI/CD is the cornerstone of scalable software development. Build your pipeline today and empower your team to deliver their best work!"

PreviousWhy IP Changes Are Important for Mobile Applications in FlutterNextDart in 2024: 20 Features You Need to Know With Code Examples and Scenarios
📄