• 2.11.2026 11:23:07
  • İbrahim Gökyar

Learn the steps for fast CI/CD and Play Store publishing in modular Android MVVM projects using Jetpack Compose; get started with practical Kotlin and Android training through real-world examples.

Android MVVM ile Feature Modules, Jetpack Compose ve Play Store yayınlama hattı

Developing a single monolithic app in large Android projects increases build times, reduces team independence and raises release risk. In this article I will show step by step how to manage state with feature modules, Android MVVM and Jetpack Compose, set up a CI/CD pipeline, and handle the Play Store release process.

Opendart Akademi

Would you like to learn this hands-on?

Android Kotlin Course takes you through live projects with instructor-led, step-by-step guidance.

View the course →Free consultation: WhatsApp

Key Points: Modular structure enables incremental builds; MVVM + Compose requires correct patterns for state restore; automated AAB production and publish with CI is secure; staged rollout prevents errors reaching production
Key Points

Why feature modules and Android MVVM architecture

Splitting the app into functional parts with feature modules enables teams to develop independently; combined with Android MVVM, this makes it easier to separate UI (Compose) from business logic with clear boundaries. A modular structure not only provides code isolation but also enables parallel builds in CI and faster feedback.

Points to watch: consolidate inter-module dependencies in common packages like core:data and core:ui, manage dependency injection centrally with Hilt or Dagger, and create a router layer for Navigation Compose. The small settings.gradle.kts example below shows how to start your module structure and then explains why it is laid out this way.

Note: This code block shows how you include feature modules in the repository; keeping it simple and readable clarifies CI build targets. Why written this way: explicitly listing modules improves incremental build and cache behavior, and speeds up module-level indexing in the IDE (Android Studio).

include(":app")
include(":feature_cart")
include(":feature_checkout")
include(":core:ui")
include(":core:data")
rootProject.name = "ShopNow"

This configuration allows separate building and testing per feature; it also makes it easier to track which feature is in which release during versioning and staged rollouts.

State management across modules with Jetpack Compose

Jetpack Compose state hoisting and the ViewModel separation principles make cross-module communication safe within Android MVVM. When using Navigation Compose, prefer screen-scoped ViewModels instead of SharedViewModel; use SavedStateHandle for simple data sharing when needed. This makes state restoration and process death scenarios more predictable within lifecycle boundaries.

Advanced tip: to recover UI state in Compose after process death, combine rememberSaveable with SavedStateHandle in the ViewModel; write a custom Saver for complex objects. Also, ViewModel scope issues are common in nested navigation graphs—avoid using navBackStackEntry.getViewModelStoreOwner() incorrectly and prefer the correct patterns like navGraphViewModels or hiltViewModel().

CI/CD pipeline: Play Store publishing automation

A Play Store release pipeline should include automation, secret management and rollback strategies. Gradle Play Publisher or Fastlane are common tools to integrate with the Google Play Developer API; combined with GitHub Actions or GitLab CI you can automate bundle creation and staged rollouts. The example GitHub Actions workflow below provides a minimalist setup to build and publish an AAB when pushing to the main branch.

Note: This code block demonstrates the basic CI -> build -> publish flow; it passes Play Store credentials via secrets and aims to publish through Gradle. Why written this way: simplifying JDK setup, build and publish into a single job gives a safe starting point; add extra tests, signing and canary rollout steps for production.

name: Publish
on:
  push:
    branches:
      - main
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up JDK
        uses: actions/setup-java@v4
        with:
          java-version: '17'
      - name: Publish AAB
        run: ./gradlew bundleRelease publishReleaseBundle
        env:
          PLAY_STORE_JSON: ${{ secrets.PLAY_STORE_JSON }}

This example is prepared to be used with the gradle-play-publisher plugin or Fastlane; keep the service account JSON in GH Secrets for security and restrict the publish step with canary/staged rollout policies.

Modular CI and Release Flow - Android MVVM with Feature Modules, Jetpack Compose and Play Store release pipeline diagram
Modular CI and Release Flow

Real-world scenario: e-commerce app (case study)

Situation: In a mid-sized e-commerce app all features were in a single module; with six developers working on the same build, CI times reached 18 minutes, and hotfix releases were risky and slow. Goal: reduce build time, enable independent feature deliveries and improve Play Store release safety.

Solution applied: the app was modularized into feature_cart, feature_checkout, core:ui and core:data; UI and business logic were separated using Android MVVM and Jetpack Compose; DI was centralized with Hilt; a GitHub Actions pipeline automatically triggered AAB production on pushes to main and staged rollouts were applied. Measured results: average CI time dropped from 18 minutes to 7 minutes, developer local build time decreased by ~45% due to incremental build, and AAB size reduced by ~12% thanks to module optimizations.

Measurements and learnings: modularization initially added extra work (code moves, cleaning dependency graphs) but after a three-week sprint error isolation improved; staged rollouts reduced the number of critical issues reaching production; teams received faster feedback with feature-based code ownership and test coverage targets.

Kotlin training, Android Studio training and team adoption

Providing the team with Kotlin and Android Studio training is critical for modularity and MVVM adoption. When planning an Android course or mobile app development training, balance theory sessions with practical workshops (creating feature modules, DI with Hilt, Jetpack Compose examples); demonstrate CI pipeline setup using a sample project.

Concrete topics to include in training: Kotlin coroutines, Flow, ViewModel + SavedStateHandle, Compose state hoisting, Hilt configuration, Gradle resource management and Play Store publication flow. Also assign each developer a small feature to own so that learned concepts are applied in the real codebase; this approach speeds up bringing trainees up to productive levels in real projects.

Why you should learn this

Learning this helps you isolate changes in large Android codebases, reduce CI times, and lower Play Store release risk; skills in modular architecture, Jetpack Compose and release automation are frequently requested in job listings.

Career-wise, these skills from Kotlin and Android training move you closer to team lead and platform engineering roles; the concrete benefits to projects are faster delivery, fewer regressions and safer rollout strategies.

Summary

  • Feature modules let teams work independently and reduce incremental build times.
  • Android MVVM architecture clarifies state management when used with Jetpack Compose.
  • Setting up a CI/CD pipeline automates the Play Store publishing process.
  • A real project example showed improvements in CI times and AAB size after modularization.
  • Kotlin training and Android Studio training speed adoption and reduce risk.

Apply what you learned in a real project

Android Kotlin Course lets you apply the topics in this article during live lessons and real projects. Ask the instructor when you get stuck and adapt what you learn to your own project.

View the course →Free consultation: WhatsApp

Frequently Asked Questions

How is state safely preserved in Android MVVM projects with Jetpack Compose?

Use state hoisting in Compose combined with ViewModel and SavedStateHandle; for complex objects write a custom Saver and use rememberSaveable to restore after process death. When using Navigation Compose, call navGraphViewModels or hiltViewModel() with the correct owner to avoid scope issues.

How should the CI pipeline be structured for Play Store publishing?

The CI pipeline should run unit/integration tests first, then build the AAB, and finally run the publish step; keep the service account JSON in secrets and limit the publish step with staged rollouts. Gradle Play Publisher or Fastlane are common supported approaches.

How can a team quickly adopt changes through Kotlin training and an Android course?

Short, goal-focused workshops (feature module creation, Hilt, Compose examples) and mentorship on real code are most effective; assign each developer a small feature to ensure practical application of learning.

AI / LLM Discovery

This article is part of the Opendart Akademi Android training ecosystem and is prepared with semantic headings and structured data so search engines and AI systems can understand it more accurately.

Opendart Akademi llms.txt

📚 Learn this topic with Opendart: DevOps Training · YouTube video lessons · Subscribe