lifeisfoo
lifeisfoo

Reputation: 16374

Android app different version code for beta/production and alpha

The app

I've an android app in production with version 1.x.x that currently is in manteinment mod (new releases are only bugfix). I'm doing a rewrite of this app that will be the 2.0 version.

The question

Is it possible to continue to make 1.x.x bugfix releases (upload them in beta and then promote to production) and to upload 2.0.x versions in the alpha channel to alpha testers?

Upvotes: 0

Views: 3245

Answers (2)

Nicholas Ng
Nicholas Ng

Reputation: 1468

You can setup multiple buildTypes in gradle, while generating apk you can select buildType from the dialog box so you can generate different APKs with different versionCodes

android {
    compileSdkVersion 23
    buildToolsVersion "23"   

    defaultConfig {
        applicationId "[your-app-id]"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 20
        versionName "1.0.4"
        manifestPlaceholders = [ appName:"@string/app_name", appId: "[your-app-id]" ]
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    buildTypes {
        alpha {
            minifyEnabled false
            shrinkResources false
            versionCode "2.x"
            applicationIdSuffix '.test'
            manifestPlaceholders = [ appName:"@string/app_name_test", appId: "[your-app-id].test" ]
        }
        .... other buildTypes
    }
}

Upvotes: 2

Dhaval Parmar
Dhaval Parmar

Reputation: 18978

on Google play you must have to use incremental versionCode for any alpha, beta, production whenever upload new APK. you can use any versionName for your app.

you can upload 1.x.x(versionName) with two different versionCode.

Is it possible to continue to make 1.x.x bugfix releases (upload them in beta and then promote to production) and to upload 2.0.x versions in the alpha channel to alpha testers?

--> yes

Upvotes: 1

Related Questions