explaingit

shanraisshan/google-huawei-flavor-buildtypes

Analysis updated 2026-07-08 · repo last pushed 2022-08-20

1KotlinAudience · developerComplexity · 2/5DormantSetup · moderate

TLDR

An Android Studio template that lets you build one app for both Google Play and Huawei App Gallery using flavors and build types, generating four app variations without maintaining separate codebases.

Mindmap

mindmap
  root((repo))
    What it does
      Builds for Google Play
      Builds for Huawei App Gallery
      Four app variations
    How it works
      Flavors split platforms
      Build types set environment
      Staging and Production
    Tech stack
      Kotlin
      Android Studio
      Gradle
    Use cases
      Ship retail app
      Reach Huawei users
      Avoid duplicate codebases
    Audience
      Android developers
      Startups
      Multi-platform teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a single Android app that ships to both Google Play and Huawei App Gallery without maintaining two codebases.

USE CASE 2

Generate separate staging and production builds for each platform to test before public release.

USE CASE 3

Use as a template to scaffold a new Android project that targets Google and Huawei ecosystems from day one.

What is it built with?

KotlinAndroid StudioGradle

How does it compare?

shanraisshan/google-huawei-flavor-buildtypesazcomp2000/battery-sentineldiredocks/cleanarchitecturenoteapp
Stars100
LanguageKotlinKotlinKotlin
Last pushed2022-08-20
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Android Studio with Kotlin support and familiarity with Gradle flavor and build type configuration.

In plain English

This template project helps Android developers manage the headache of building one app for both Google Play and the Huawei App Gallery. Instead of maintaining two separate codebases, you write your app once and this setup lets you generate versions specific to each platform automatically. At a high level, it uses two built-in Android Studio features: "flavors" and "build types." Flavors split the code so you can include Google-specific services (like Google Maps or push notifications) in one version and Huawei-specific equivalents in another. Build types handle the environment, switching between a Staging version for testing and a Production version for your public release. The project combines these to produce four distinct app variations: Google Staging, Google Production, Huawei Staging, and Huawei Production. This is useful for developers building Android apps who want to reach both audiences, especially given Huawei's recent push for its own ecosystem separate from Google's. A startup shipping a retail app, for instance, could use this to serve users on standard Android phones and Huawei devices without duplicating their entire codebase. The template essentially provides the scaffolding so you can drop your app's code in and immediately start generating the correct builds. The README itself is fairly sparse on step-by-step detail, but it links to a full Medium article explaining the approach. It includes screenshots of both the Google and Huawei versions running, showing that the setup visually and functionally separates the two platforms. The main tradeoff here is a common one in Android development: you keep everything in one project for convenience, but the configuration can get complex as you add more platform-specific differences.

Copy-paste prompts

Prompt 1
Set up an Android Studio project with flavors for Google Play and Huawei App Gallery, with staging and production build types, based on the google-huawei-flavor-buildtypes template approach.
Prompt 2
Show me how to configure Gradle flavors and build types so I can produce four app variants: Google Staging, Google Production, Huawei Staging, and Huawei Production.
Prompt 3
Help me structure my Android app codebase so platform-specific services like Google Maps and Huawei equivalents are isolated by flavor while sharing common business logic.

Frequently asked questions

What is google-huawei-flavor-buildtypes?

An Android Studio template that lets you build one app for both Google Play and Huawei App Gallery using flavors and build types, generating four app variations without maintaining separate codebases.

What language is google-huawei-flavor-buildtypes written in?

Mainly Kotlin. The stack also includes Kotlin, Android Studio, Gradle.

Is google-huawei-flavor-buildtypes actively maintained?

Dormant — no commits in 2+ years (last push 2022-08-20).

How hard is google-huawei-flavor-buildtypes to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is google-huawei-flavor-buildtypes for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.